+1 vote
in Operating Systems by (60.0k points)

In the /lib/modules folder, I see several old kernel modules that are taking up space on my system. I do not think those old kernel modules are used by the system. Is there any way to remove them without affecting the system?

1 Answer

+2 votes
by (9.9k points)
selected by
Best answer

I am not sure why Ubuntu and Debian don't remove old kernels when new ones are installed. However, if you want to free up some space on your system without affecting it, you can run the following command in the terminal:

sudo apt autoremove --purge

You can run this command before/after upgrading the kernel to keep disk usage a bit low. 

Related questions