Standard sizes of /usr and /var
I just randomly ran a disk usage check today, and I found that /usr and /var are occupying way too much of my space.
I get the reason why /usr occupies so much space (all the binaries and stuff; I also have ~1120 packages installed), but I don't get why /var is taking so much of space. Can anyone provide a reason for it? And, is it normal?
Here is the output for du -sh /*.
About this post
- Posted
- Archived
- Score
- 0 · 100% up
- Kind
- Text
- ID
- b4gnpl
11 comments
Probably Pacman's cache. Did you remove the old package archives recently?
I have never cleared the cache, or the archive.
Is it recommended?
Not the full clearing but there is a command in the Wiki that lets you keep 3 versions of each package in case you need a small downgrade.
Deleted before we saved it.
And did you run du in /var?
I think we might be onto something...
Yup, it's pacman's cache. Cleaned it up a bit (saved previous 1 versions of packages), and got ~9 GBs back.
/var contains all system logs, caches and application data. It can grow to 100s of GB depending on what you do. For example I have docker and it regularly grows that large as it stores all the container volumes and images in /var/lib/docker. The Packman cache is also located there which can grow to 10s of GB over time.
I don't have it on a seperate partition. I have three partitions for my Linux installation, i.e. boot, swap, and the rest. (I am talking of HDD partitions)
You're correct. Most of my var is occupied by docker and Pacman cache. I have cleared it up a bit, now.
Ah, sorry I am not sure why I got that impression, completely miss read it.