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.
To see how big the package cache is, run:
du -sh /var/cache/pacman/pkg/
You can manually remove cached packages that are no longer installed with:
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
Add the following content to the file:[Trigger]
Operation = Upgrade
Operation = Install
Operation = Remove
Type = Package
Target = *
[Action]
Description = Cleaning pacman cache with paccache…
When = PostTransaction
Exec = /usr/bin/paccache -r
Save the file with Ctrl + S and exit with Ctrl + X.System logs can take up a considerable amount of space over time. You can check the size of your logs with:
journalctl --disk-usage
To remove logs older than 3 days:
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.
As you use your system, caches will accumulate in your home directory. You can check the size of your cache folder with:
sudo du -sh ~/.cache/
To remove all cache files:
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! 💪✨