I have a 2G home partition, /lib/modules is taking more that 1.5G. I got 12 directory named after version of kernel 2.6.32 each taking 119k. Why do I have all of that? Do I need all of that? If not, what is the clean way to remove what I don't need?



Automatic update is installing each new kernel, but there is no clean-up, and there is a copy of the module for each kernel.

There is a package entry called :


Removing it removed the corresponding files in /lib/modules

  • 10
    This is correct, but there are more complete instructions for cleanup at askubuntu.com/questions/2793/… – Amanda Apr 28 '13 at 23:51
  • 7
    sudo apt autoremove does this for you in current Ubuntu versions. No need to manually clean the files. – Kasun Gajasinghe Jun 13 '18 at 9:49
  • 1
    Autoremove does not work for me. But sudo apt-get purge linux-image-4.15.0-45-generic does. – Sridhar Sarnobat Apr 8 '19 at 2:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.