A deeper look into the sizes of these root subdirectories using du -sh /var/cache/* returns 15M var/cache/app-info 4.0K var/cache/cups 1.7M var/cache/fontconfig 4.0K var/cache/ldconfig 4.0K var/cache/man 7.6G var/cache/pacman 411M var/cache/pkgfile 4.0K var/cache/private 4.0K var/cache/samba 4.0K var/cache/snapd
So, pacman cache is really the one dominating most of the /var size.
Based on the output of the second du command above, am I right to say that most of the size of /usr is dominated by user-installed programs?
I am surprised by the storage size the /var and /usr directories take up. For your info, my Manjaro installation is just 5 months old and I am not a software-greedy person, I install only what I need. As I recall during the course of this 5 months, I installed insync, megasync, avogadro, and their dependencies. I mentioned only these programs because they look like somewhat big program (they have GUI) but there may be other CLI-based software installed that I don’t know are big. I am just really skeptical that I have been that intense in installing program by Linux standard.
As for the pacman cache, will it do and be safe if I simply rm everything inside /var/cache/pacman?
These two directories are in a partition that is now only having less than 2G of free space thanks to them, I really need to do some cleaning. Do you mind sharing how big are these two subdirs of root in your computer and how long have you been using Manjaro?
Sorry for late reply. I did that and keep the current and last version if installed packages, it freed only about 3 Gb. I look into my MacBook Pro, the applications takes up only less than 5 Gb. Now I am not sure where those extra sizes in my /var and /usr come from.
My Pacman cache is similar, it depends on your configuration. Look in Pamac Settings for GUI configuration, choose the number of version for each package to keep there, you can also click the Clean button regarding your newly selected setting.
For /usr/ it contains the system basically… at some point install minimal OS and go from there if you want the leanest install. Or uninstall everything you don’t need on your system.
A basic misconception is that /usr/ stands for user, it doesn’t, it stands for User System Resources if I’m not wrong.
To be fair, a system (/usr/) under 10GB is small, what do you expect in size? Install Manjaro MINIMAL ISO if you want the least packages installed (but then you need to install additional packages to suit your needs).
The Pacman cache is obviously a convenience folder, you don’t NEED it for the system to run, but it saves time when you need to reinstall a package, it helps to downgrade if needed with older kept packages, things like that, as said you can configure it to be empty.
Even the full ISOs are markedly smaller in system install size than say windoze … but once you start installing things it can grow of course.
Example, this is an old and not particularly clean system and my /usr/share is 5.8G …
I do remember I had to install a handful of dependencies of megasync. May be these are the things that takes up the space. Or may be not since I also install megasync in my MacBook and the applications part of the used space is just less than 4 Gb. I don’t know, may be I should look to buying a bigger SSD and do repartition.
Yeah, I mentioned /var/cache because this is the subdir of /var that takes the most space. The second biggest is /var/log/journal which is about 2.9 Gb, I don’t know what this is.
It contains every event in the system, according to its ‘log level’ (report warning? or errors? etc)
There is more at the wiki systemd/Journal - ArchWiki
But suffice to say that these lines of text do not take up very much space individually … a size of 50M will still allow you to read logs from multiple boots prior, assuming your journal isnt being spammed by constant error messages. And thats assuming you even need/want the logs at all.
Honestly if you dont know what it is … you likely do not need it to be very large.
(I do inspect logs from time-to-time and 50M is quite enough for a personal system)