The fastest way to see how much disk space you have left
The simplest command to check disk space in Linux is df -h, which you run in the terminal. Type it exactly as shown, press Enter, and you will see a table showing every disk or partition on your system, how much space each one holds, how much is used, how much is free, and what percentage is full. The -h flag means "human-readable" — it shows sizes in gigabytes or megabytes instead of raw bytes.
If you want to know how much space a specific folder is taking up — for example, your Downloads folder or your home directory — use du -sh /path/to/folder. Replace /path/to/folder with the actual path. For your home directory, you can type du -sh ~ and press Enter. The output tells you the total size of that folder and everything inside it.
Both commands work the same way on every Linux system, whether you are using Ubuntu, Fedora, Debian, or another distribution. You do not need special permissions to run them.
Key Takeaways
- Run df -h in the terminal to see all disks and partitions, how full each one is, and how much free space remains.
- Run du -sh /path/to/folder to find out how much space a single folder and its contents are using.
- The -h flag shows sizes in gigabytes or megabytes instead of bytes, making the numbers easier to read.
- Both commands work on any Linux system without requiring administrator access.
- If a disk is over 90 percent full, you should delete or move files to prevent system slowdowns or crashes.
Understanding the df output
When you run df -h, you see columns labeled Filesystem, Size, Used, Avail, Use%, and Mounted on. The Filesystem column shows the name of the disk or partition. Size is the total capacity. Used is how much space is currently occupied. Avail is how much free space is left. Use% is the percentage of the disk that is full — this is the number to watch.
Most of the time you will see multiple rows. One might be your main hard drive. Others might be temporary system partitions, USB drives you have plugged in, or network storage. The Mounted on column tells you where each one appears in your file system. Your main drive is usually mounted at / (the root). Your home folder is usually on the same partition.
If the Use% column shows 90 percent or higher for your main partition, you should delete or move files soon. A disk that is nearly full can slow down your system or cause programs to crash when they try to write temporary files.
Finding which folders are using the most space
If your disk is full and you need to know what is taking up room, use du -sh * while inside the folder you want to check. This shows the size of each item in that folder. For example, if you run it in your home directory, you will see how much space your Documents folder uses, how much your Videos folder uses, and so on.
You can also check a specific folder without being inside it. Type du -sh ~/Documents to see the total size of your Documents folder, or du -sh ~/Videos for your Videos folder. Replace the path with any folder you want to measure.
If you want to see the size of each subfolder too, use du -sh ~/Documents/* to list every folder inside Documents. This helps you narrow down which subfolder is the culprit when a large directory is taking up space.
Checking disk space with a graphical tool
If you prefer not to use the terminal, most Linux desktop environments include a file manager with a built-in disk usage viewer. In Ubuntu with GNOME, open the Files process, click the menu button (three horizontal lines), and select "Disk Usage". This opens a visual map showing which folders are using the most space. You can click on any folder to zoom in and see what is inside it.
Other desktop environments have similar tools. KDE Plasma includes Filelight, which shows disk usage as a colorful circle diagram. Xfce includes Thunar, which has a folder properties dialog that displays size. If your system does not have a built-in tool, you can install a dedicated process like Baobab (GNOME Disk Usage Analyzer) or QDirStat from your package manager.
Graphical tools are slower than terminal commands when checking very large folders, but they are easier to navigate if you are not comfortable with the command line.
Monitoring disk space over time
If you want to track how full your disk is getting, you can run df -h regularly and write down the numbers, or you can set up a straightforward script to log them. For most users, checking manually once a month is enough. If you read large files often or run a server, checking weekly makes sense.
Some Linux systems have monitoring tools that track disk usage automatically. GNOME includes a Settings panel that shows storage information. You can also install Stacer or other system monitor applications that display disk usage in a dashboard. These tools send you a warning when a disk gets close to full.
The key is to notice the trend before you run out of space. If your Use% is climbing by 10 percent every month, you know you need to clean up or add more storage soon.
Freeing up disk space safely
Once you know what is taking up space, you can delete files you no longer need. Start with obvious candidates: old downloads, temporary files, and duplicate photos or videos. In your home directory, the .cache folder often contains gigabytes of old process data that is safe to delete. You can also clear your package manager's cache — on Ubuntu, run sudo apt clean to remove old installation files.
Before you delete anything, make sure you have a backup of important files. If you are deleting from a folder you did not create, research what it is for first. System folders like /usr or /var should not be touched unless you know exactly what you are doing.
If you need more space permanently, consider adding a second hard drive or upgrading to a larger one. On a laptop, this might mean replacing the internal drive. On a desktop, you can usually add a second drive without removing the first one.
Frequently Asked Questions
What does "Avail" mean in the df output?
Avail is the amount of free space left on that disk or partition. It is the space available for you to write new files. If Avail is small, you should delete files or move them to another disk.
Why does my disk show as 100 percent full when I have deleted files?
Deleted files sometimes do not free up space when ready if programs are still using them. Restart your computer to force those programs to close and release the space. If that does not work, the files may be in the trash and need to be emptied.
Can I check disk space on an external USB drive?
Yes. Plug in the USB drive, then run df -h. The drive will appear in the list with its own row. You can also use du -sh /media/username/drivename to check a specific folder on the drive.
Is it safe to delete files from the .cache folder?
Yes, .cache folders are safe to delete. They contain temporary data that applications recreate as needed. You can delete them manually or use rm -rf ~/.cache in the terminal, but back up important files first if you are not sure.
What should I do if my root partition is full?
First, find what is taking up space using du -sh /* to check top-level folders. Common culprits are old log files in /var/log or old kernels in /boot. You can also run sudo apt clean to remove old packages. If nothing helps, you may need to add more storage or reinstall Linux on a larger drive.