Running out of disk space on your Manjaro Linux system can be frustrating. You might be surprised to see "Disk Full" notifications, especially if you don't think you're storing that much data. This article provides a step-by-step guide to help you diagnose and resolve disk space issues on your Manjaro system.
The first step in solving any problem is understanding it. You've encountered a common issue where notifications alert you to a full disk, but tools like Disk Usage Analyzer seem to provide conflicting or incomplete information.
The Disk Usage Analyzer is a graphical tool that helps visualize disk space usage. However, it can sometimes be misleading for a few reasons:
Here are several effective methods to identify which files and directories are consuming the most disk space on your Manjaro system:
du
CommandThe du
command is a powerful command-line utility for estimating file space usage. Here's how to use it:
Basic Usage: du -sh /*
This command will display the size of each top-level directory in the root directory (/
).
-s
tells du
to summarize disk usage.-h
displays the output in human-readable format (e.g., KB, MB, GB)./*
means "all files and directories directly under /".Finding Largest Directories: sudo du -hsx /* | sort -rh | head -10
sudo
is used to gain root permissions to access all directories.-x
limits the search to the same filesystem.sort -rh
sorts the output in reverse order (largest first) and in human-readable format.head -10
displays the top 10 largest directories.Checking Home Directory: To analyze your home directory, replace /
with ~
(e.g., du -sh ~/*
).
ncdu
ncdu
(NCurses Disk Usage) is an interactive disk usage analyzer that is much faster than the graphical tool:
sudo pacman -S ncdu
sudo ncdu /
ncdu ~
q
to quit.ncdu
provides a clear, interactive view of disk usage, making it easy to find the largest files and directories.
Sometimes, large log files can consume significant disk space. Use journalctl
to manage system logs. You can also check other logs in /var/log
.
sudo journalctl --vacuum-size=500M
This command will reduce the journal size to 500MB.Manjaro keeps a cache of downloaded packages. You can safely clear out old versions:
sudo pacman -Sc
Caution: Be careful when deleting files, especially system files.
Now that you've identified space-hogging files and directories, here are some steps to free up disk space:
sudo pacman -Sc
will clean out old versions of downloaded packagesDownloads
folder probably contains several large files.By using the du
command, ncdu
, and other troubleshooting steps, you can identify what’s consuming disk space on your system. Regularly monitoring your disk usage and following the space-saving tips can prevent future "Disk Full" alerts and keep your system running smoothly.