On 11.01.22 19:25, Roy J. Tellason, Sr. wrote:
So I'm poking around with mc, and happened across /var/cache/apt/archives
which has a LOT of *.deb files in it, and which seems to include many versions
of the same package, some of them many years old, going all the way back to
2013. I guess I've been running debian a little longer than I'd thought...
Is it okay to just delete older versions of these files? Or should I be doing
something using one of the package management tools? I've mostly used
synaptic, but am also aware of apt-get, apt, aptitude, and am not real
clear on their comparative capabilities.
I'm looking at over 7500 files amounting to over 9.5GB.
I also see /var/cache/dictionaries-common, which appears to be tied to a
spelling checker, which I don't use here. And /var/cache/samba, which I also
don't use -- there isn't a windoze machine around here at all.
What's the best way to get all of this excess stuff out of the system?
Just to give you some more inspiration about where else old stuff could
have accumulated:
For the case that you would work with programming languages, then
consider to check if they carry old ballast which you do not want to
keep. For Python it could be cleaned off old ballast with the "clean"
function of "conda", if you managed your python with conda, and for
Julia there is some "]gc" garbage collector, just to give some examples.
Other software is likely to also have tools like this. The point is,
these programming language environments maintain their local stock of
downloaded versioned packages similar like Debian is maintaining its
packages, and you might also find there a significant amount of no more
needed stuff.
I agree, cleaning tasks produce headaches, but if you are in need to
free space, then you might need to go for it. You could always consider
to have a nice backup in some offline storage before deleting stuff, so
that you could copy it back into place if cleaned too much.
Another tip: the CLI tool "ncdu" can be helpful to localize where stuff
accumulated.
Good luck!
Marco