Are you getting those dreaded "Disk Full" notifications on your Manjaro Linux system, even though you're sure you don't have that much stored? You're not alone. Identifying the culprit gobbling up your precious disk space can be a frustrating task. The graphical tools sometimes fall short, leaving you scratching your head.
This article will guide you through troubleshooting those mysterious disk space hogs on your Manjaro Linux system. We'll explore a common issue – discrepancies in disk usage reporting – and provide effective ways to pinpoint where all your storage is vanishing.
One of the first instincts when facing low disk space is to fire up the Disk Usage Analyzer. However, as experienced by some users like this one on the Manjaro forum, it might not always tell the whole story. You might see inconsistencies between the analyzer's reported disk size and the actual drive capacity or discover that it only scans part of the disk.
So, what causes this confusion? There are a few potential culprits:
/root
, /var
). This can occur if you run the utility as a regular user..
) for configurations and system data. The Disk Analyzer could be configured not to display those by default.When graphical tools falter, the command line comes to the rescue. Here are some powerful commands to unearth disk space usage:
df -h
(Disk Free - Human Readable): This command swiftly displays disk space usage for all mounted file systems in a human-readable format (e.g., GB, MB).
df -h
This will show you overall usage which will allow you to see if you are actually running out of disk space.
du -hsx /* | sort -rh | head -20
(Disk Usage - Summarized - One File System): This command combines several utilities to provide a ranked list of directories based on their disk usage, excluding other file systems. This prevents du
from traversing into mounted partitions and skewing the results, and sorts to give you the biggest hogs.
du -hsx /* | sort -rh | head -20
Here's a breakdown:
du -hsx /*
: Calculates disk usage for each directory in the root directory (/
) in a summarized (-s) and human-readable (-h) format, staying on one file system (-x).sort -rh
: Sorts the results numerically in reverse order (-r) and human-readable format (-h).head -20
: Displays the top 20 lines, revealing the directories consuming the most space.ncdu
(NCurses Disk Usage): A similar tool to du -hsx /*
, ncdu
provides an interactive, ncurses-based interface. This allows you to visually navigate your directory structure and identify large files and folders quickly. You need to install it first if it's not already:
sudo pacman -S ncdu #For Arch/Manjaro or derivatives
Then to Run from the root directory:
sudo ncdu /
Once you've identified the space-consuming culprits, you can start reclaiming your storage. Here are some common scenarios and solutions:
/var/log
and consider configuring logrotate to automatically archive and delete old logs.sudo pacman -Rns <package name>
(be cautious and ensure you are not removing critical system components). Take extreme care with the sudo
command at all times and ensure you are running with root user only when necessary./boot
. Remove the OLD kernel for storage using Manjaro Settings Manager or command sudo pacman -Rns linux<kernal number>
.Prevention is better than cure. Implement these practices to avoid disk space issues:
df -h
periodically to keep track of your available space.sudo pacman -Sc
or sudo pacman -Scc
to remove all./home/<user>/Downloads
.Don't let mysterious disk space consumption frustrate you. By following the steps outlined in this article, you can effectively identify and resolve the issue. Remember to use a combination of graphical tools and command-line utilities for a comprehensive analysis. With proactive monitoring and regular maintenance, you can keep your Manjaro Linux system running smoothly and avoid those dreaded "Disk Full" notifications.