I’ve had an Ubuntu 22.04 setup going for around a year, and over that year I’ve had to increase the size of the partition holding my /var folder multiple times. I’m now up to 20GB and again running into problems, mainly installing new apps, because that partition is again nearly full. I’ve used commands sudo apt clean and sudo journalctl --vacuum-size=500 to temporarily clear up some space, but it doesn’t take long to fill back up, and gets less effective with time, til I have no choice but to expand the partition again.

Am I doing something wrong? Is it normal to need 20GB+ for var? Is there a way to safely reclaim space I don’t know about?

  • If vacuuming journalctl helps, something is spamming the logs. That can be something silly {a Gnome extension managed to fill up the logs for me once) but it can also be a hard drive or motherboard on the verge of death throwing tons of errors everywhere.

    If it’s a log file, find it and see what’s being spammed. You may need to check the connections inside your PC or start saving up for replacement hardware.

    It’s also possible that you use docker. Docker works by downloading entire copies of OS file systems (the “it works on my machine, so we’re shipping my machine” approach of software deployment). A few updates can easily eat up gigabytes of space.

    I’ll occasionally run docker system prune once I’ve verified that all my docker images are running, that gets rid of most of the exces.