Ubuntu low disk space on Filesystem root. How to resize root or delete files?
It seems like there is a connection between the various aspects to your question.
-
/usr/src
is a location for source code for installed packages. -
/lib/modules
is a location for kernel modules. -
linux-headers-X.XX.X-XX
are the header files for your installed kernel(s). Header files are used when you wish to compile a kernel module for your specific kernel. Many common pieces of software compile kernel modules, like Virtualbox, lm-sensors, etc. see here for some more detailed discussion of exactly how they manifest. I always install the kernel headers and thebuild-essential
package when setting up a new desktop, as I usually end up needing it at some point (I don't for servers though, compilers can be a security risk).
So, this all leads me to believe that you have more than one kernel installed, which is a pretty common problem. Its not a bad idea to keep one version back, especially right after an upgrade, but they are large, and can pile up.
Even if you have only one Kernel, You do not need the headers except when installing something that requires compilation against the kernel, so you can always uninstall the packages from Synaptic or software center.
if you have multiple old kernels still installed, you can usually remove them with sudo apt-get autoremove
or review the options here for your system. In addition to clearing the kernels, and the header source files, this will also remove the old kernel's modules, stored in /lib/modules
15GB is usually more than sufficient for a root partition, and resizing partitions is a tricky proposition, but it is definitely possible. I strongly recommend you consult this documentation to review your situation, and plan the operation. it will involve shrinking /home
, moving it to the right, and finally extending the /
.