How can I perform a cleanup on ubuntu server?

Posted January 19, 2016 8.3k views
UbuntuServer OptimizationCaching

Is it possible to do a “cleanup” on a Ubuntu server? I am thinking about temporary files and folders, log files etc. which can take up space.

My server was using 94% of the available storage, and after I shut it off and upgraded to double storage it was using 20%, which makes me believe that there is/was some temp files/folder that got deleted on the restart?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

That’s possible, yes. Most (if not all) of the log files are stored in /var/log. I’d recommend using a program like ncdu, which can be installed using apt-get, to see what’s taking up a lot of space and maybe delete some of them.