Over time, your system may accumulate unnecessary files that take up valuable space. This guide will walk you through several methods to reclaim disk space on your BredOS system.
When installing or updating packages, pacman
keeps cached copies in /var/cache/pacman/pkg/
to make reinstallation faster. However, these cached packages can accumulate and use up disk space.
du -sh /var/cache/pacman/pkg/
sudo pacman -Sc
You can also use paccache
to keep only the most recent 3 versions of each package.
sudo pacman -S pacman-contrib
sudo nano /usr/share/libalpm/hooks/paccache.hook
[Trigger]
Operation = Upgrade
Operation = Install
Operation = Remove
Type = Package
Target = *
[Action]
Description = Cleaning pacman cache with paccache…
When = PostTransaction
Exec = /usr/bin/paccache -r
journalctl --disk-usage
sudo journalctl --vacuum-time=3d
BleachBit is a powerful tool that helps you clean up system junk, free disk space, and protect your privacy. You can learn more about how to use BleachBit here.
sudo du -sh ~/.cache/
rm -rf ~/.cache/*
Sometimes, large files can take up space unnecessarily. Here are tools you can use to identify them:
duc — A disk usage inspector.
Website | AUR: ducAUR
gdu — Disk usage analyzer with console interface.
GitHub | AUR: gduAUR
ncdu — ncurses disk usage analyzer.
Website | AUR: ncdu
Filelight — Interactive disk usage map with concentric rings.
Website | AUR: filelight
GNOME Disk Usage Analyzer (baobab) — Disk usage analyzer for GNOME.
Website | AUR: baobab
qdirstat — Qt-based directory statistics tool.
GitHub | AUR: qdirstatAUR
Free up space and keep your BredOS system running smoothly!