Hi -
I’m running Kernel 5.15.78-1 with DE Plasma 5.26.3 and have a question about cache accumulating in /
My running system takes about 20g and has another 13g spare in /. According to the tool available in Octopi I could free up another 3.5g if I delete the cache. Based on my experience, I don’t really see a need to hang on to old copies libraries and apps even though I believe the recommendation is to keep a least one version back. I’ve never needed to use it . What are your thoughts?
If your filesystem is ext4, you can immediately free up some space by shrinking the (nearly useless) “reserved blocks” from 5% total capacity down to 64 MiB (or 32 MiB).
For 64 MiB:
sudo tune2fs -r 16384 /dev/sdX#
Or for 32 MiB:
sudo tune2fs -r 8192/dev/sdX#
Replace sdxN with the actual partition, such as sda2
This means rather than having approximately 1.6 GiB being wasted on “reserved blocks”, you can liberate it, since it will now only take up 32 MiB or 64 MiB.
However, this has got nothing to do with the original question:
whether to keep a cache of the installed packages
Almost all the system files are owned by root anyway
and this will only benefit the space for those files NOT owned by root
(files in the users $HOME, mostly)
generally: no
because, as I said
these files are owned by root anyway
root can always write until the file system is completely full
no matter the reserved blocks percentage
The reserved space is space that users other than root cannot fill up.
So that (a responsible root user) always has got a margin of free space to work with
in case it is needed.
But adjusting this - as you did, as was suggested - is a good thing nonetheless.
That way you, as a normal user, can use the all of the space on your disk, instead of keeping you from using 5% of it
which is a lot with a 1 TB drive (50 GB not usable for you …)