Archive for the 'System Maintenance' Category

Cleaning your system from outdated software

As you install, uninstall and update applications there are some garbage left behind.


Autoremove

When you run autoremove, packages that have been installed but are no longer in use, are removed.

sudo apt-get autoremove


Autoclean

Autoclean removes .deb files from packages no longer installed on your system.

sudo apt-get autoclean

Do you have other cleaning tips? Send me an email or post a comment.


last updated: 22-07-2008

______________________________________________________________________________________

Removing old kernels from your system

After a while you’re starting to collect kernel versions on your system.

Since Hardy came out, with kernel 2.6.24-16, we had two kernel updates, so, in grub we have now entries to kernels 2.6.24-16, 2.6.24-17 and 2.6.24-18.

We just need one to boot in, and we and the most recent one of course. Still, when deciding to remove an old kernel be aware of possible problems.

Virtualbox for instance, needs a module to the specific kernel you’re running. Every time a new kernel is released your Virtualbox setup will not work until your upgrade the said module.
So, if you need to use Virtualbox and you don’t yet have the new module, you could just restart into the old kernel.

So, think before you remove old kernels.

Removing old kernels

  • Check what versions you have installed
sudo dpkg --list | grep linux-image
  • Output example
ii  linux-image-2.6.24-16-generic                  2.6.24-16.30                                       Linux kernel image for version 2.6.24 on x86
ii  linux-image-2.6.24-17-generic                  2.6.24-17.31                                       Linux kernel image for version 2.6.24 on x86
ii  linux-image-2.6.24-18-generic                  2.6.24-18.32                                       Linux kernel image for version 2.6.24 on x86
ii  linux-image-generic                            2.6.24.18.20                                       Generic Linux kernel image
ii  virtualbox-ose-guest-modules-2.6.24-18-generic 24.0.3                                             virtualbox-ose-guest module for linux-image-
ii  virtualbox-ose-modules-2.6.24-18-generic       24.0.3                                             virtualbox-ose module for linux-image-2.6.24
  • In this example, only the first 3 rows are candidates to go. Make sure you don’t remove the kernel you’re using.
uname -r
  • To remove, for instance 2.6.24-16
sudo apt-get remove linux-image-2.6.24-16-generic
  • Update your grub list
sudo update-grub

And that is that.

Further reading

last updated: 05-06-2008

___________________________________________________________________________________________________