Skip to main content

Warning: count(): Parameter must be an array or an object that implements Countable in C:\home\site\wwwroot\gs\plugins\i18n_navigation\frontend.class.php on line 219

Clean up space

Remove the old kernels

  1. List or Check Installed Linux Kernels
    dpkg --list | grep linux-image
  2. Remove the old Kernel
    sudo apt-get remove --purge 2.6.27-10-*

Remove all unused kernels at once

Source

WARNING: if you’ve upgraded your system, or had an update with a new kernel, please reboot your machine before running this!

dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge

Clean APT

  1. Cleaning up of partial package: sudo apt-get autoclean
  2. Cleaning up of the apt cache: sudo apt-get clean
  3. Cleaning up of any unused dependencies: sudo apt-get autoremove

Other

8 Ways to Maintain a Clean, Lean Ubuntu Machine