Contents
How do you see what is taking up space on Linux?
To find out where disk space is being used:
- Get to the root of your machine by running cd /
- Run sudo du -h –max-depth=1.
- Note which directories are using a lot of disk space.
- cd into one of the big directories.
- Run ls -l to see which files are using a lot of space. Delete any you don’t need.
- Repeat steps 2 to 5.
How do I clean up disk space in Linux?
Freeing disk space on your Linux server
- Get to the root of your machine by running cd /
- Run sudo du -h –max-depth=1.
- Note which directories are using a lot of disk space.
- cd into one of the big directories.
- Run ls -l to see which files are using a lot of space. Delete any you don’t need.
- Repeat steps 2 to 5.
How to check free disk space on Ubuntu?
But before that, let’s see how to find the free space remaining on Ubuntu. Check free space on Ubuntu. It’s always a good idea to check the free disk space in Linux first. This is rather easy on Ubuntu. Just use Disk Usage Analyzer tool. Search it in the menu and run the tool. You should see the disk space used and the free space remaining in here:
How to allocate unallocated space in Ubuntu hard disk?
The filesystem mounted on / will be the Ubuntu partition. Right-click the partition and select Resize/Move Expand the Ubuntu partition into the unallocated space
Why does Ubuntu take so much disk space?
Every Linux distribution has a logging mechanism that help you investigate what’s going on your system. You’ll have kernel logging data, system log messages, standard output and errors for various services in Ubuntu. The problem is that over the time, these logs take a considerable amount of disk space. You can check the log size with this command:
How to free up space on Ubuntu Linux Mint?
Alan Pope, part of Snapcraft team at Canonical, has created a small script that you can use and run to clean all the older versions of your snap apps. Give it execute permission, run the shell script with sudo and see the magic. The script removed the older Snap packages and freed over half of the 5 GB space used by Snap. 6.