Skip Navigation

help: var folder on ubuntu won't stop filling up

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?

26

You're viewing a single thread.

26 comments
  • You can use du -sh to figure out what's using most of the space. Something along the line of:

    sudo -i
    du -sh /home /usr /var
    du -sh /var/*
    du -sh /var/log/*
    # etc
    

    If it's one of your log files (likely), you can run something like tail -n 100 /var/log/[culprit] or tail -F /var/log/[culprit] to see what is being flooded in this log file exactly. Then you can try to fix it.

26 comments