Running out of disk space on your Manjaro system can be a frustrating experience. You might be surprised to see those low disk space notifications popping up, especially if you don't think you have a ton of files stored. The good news is that there are some pretty straightforward ways to diagnose the problem and reclaim your precious storage. Let's dive in!
One of the common issues that users encounter is that visual tools like Disk Usage Analyzer sometimes don't paint the complete picture. You might see discrepancies between the total disk size and what the analyzer reports. If that sounds familiar, you're not alone.
While graphical tools have their place, the command line often provides more accurate and detailed information about disk usage. Here are a few powerful commands to help you track down those space-hogging files and folders:
du
(Disk Usage): This is your go-to command for estimating file space usage.
du -sh /
: Provides a summary of disk usage for the entire root directory (/
). The -s
flag gives a summary, and -h
makes the output human-readable (e.g., using GB and MB).du -sh /*
: Shows disk usage for each top-level directory within the root directory. This helps you quickly identify which major directories are consuming the most space.du -hsx /*
: Similar to the above, but with the -x
flag added. This tells du
to stay on the same filesystem, which is crucial if you have multiple partitions or mounted drives. Without it, du
might traverse into other filesystems and give misleading results.df
(Disk Free): This command reports file system disk space usage.
df -h
: Displays disk space usage for all mounted file systems in a human-readable format. This is particularly useful for seeing the overall usage of your root partition and any other partitions you might have.Now that you know how to investigate, let's talk about some common reasons for unexpected disk space usage:
/var/log
directory.sudo pacman -Scc
. Be careful with these commands, and read the documentation before using them, since they affect system updates./tmp
can sometimes take up significant space.Here's a systematic approach to finding out what's filling up your disk:
df -h
: Get an overview of disk space usage for all mounted file systems.du -sh /*
: Identify the top-level directories consuming the most space./home
is taking up a lot of space, use du -sh /home/*
to see which user directories are the biggest. Continue drilling down into the directories, using du -sh
to identify the largest subdirectories.sudo pacman -Scc
.df -h
and du -sh /*
again to see if you've freed up enough space.By using these tools and techniques, you should be well-equipped to diagnose and resolve your Manjaro disk space issues. Happy troubleshooting!