Can someone provide some background?
It seems like this folder is growing even when I'm not updating or installing any packages, but I'm not entirely sure about that.
Context: My AWS instances keep running out of disk space, and i already learned to do this periodically:
apt-get -y autoremove
apt-get -y autoclean
But I don't understand why it grows in the first place.
Also see:
- Safe to remove /usr/src/linux-headers after purging older linux images?
- Why so many linux-headers, even for absent images
EDIT: On my very new server i get this:
du -h -d1 /usr/src/ | sort -hr
266M /usr/src/
115M /usr/src/linux-aws-headers-4.15.0-1035
115M /usr/src/linux-aws-headers-4.15.0-1032
19M /usr/src/linux-headers-4.15.0-1035-aws
19M /usr/src/linux-headers-4.15.0-1032-aws
dkms
compiles driver programs. How large are your directories?du /usr/src/ -d 1 -h
and paste the results into your question. Reply using @WinEunnuchs2Unix and I'll check the output for clues. A single Linux Kernel version's headers are about 120 MB on my machine. I have almost 20 kernel headers installed plus other "driver stuff" and `/usr/src/ is only 1.5 GB.