Freeing disk space on your Linux server

To find out where disk space is being used:

Get to the root of your machine by running

# cd /


# sudo du -h --max-depth=1

Note which directories are using a lot of disk space.
cd into one of the big directories.

# ls -l

to see which files are using a lot of space. Delete any you don’t need.
Repeat steps to run once you cd into the directory with the largest size

sudo du -h --max-depth=1

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.