pacman
, the package manager for RebornOS keeps packages in cache so if they need to be reinstalled its quick and easy but sometimes they tend to collect some big packages that are mostly not needed they are stored in /var/cache/pacman/pkg/
you can see how big the cache is by running du -sh /var/cache/pacman/pkg/
. There are two ways of reclaiming that space Manually or Automatically.
One option is to remove cached packages that are not currently installed:
sudo pacman -Sc
Another way to clean the /var/cache/pacman/pkg/
directory is to use a script that automatically deletes all cached versions of installed and uninstalled packages, except for the most recent 3 versions. The script is called paccache
. You can install it with the pacman-contrib
package -
sudo pacman -S pacman-contrib
You can run paccache
every time after you run pacman
. So, you need to create a Hook for that. Just create a file /usr/share/libalpm/hooks/paccache.hook
.
sudo nano /usr/share/libalpm/hooks/paccache.hook
Add this content into the file, then press Control S and Control X
[Trigger]
Operation = Upgrade
Operation = Install
Operation = Remove
Type = Package
Target = *
[Action]
Description = Cleaning pacman cache with paccache …
When = PostTransaction
Exec = /usr/bin/paccache -r
Every Linux distribution has a logging mechanism that help you investigate what’s going on your system. You’ll have kernel logging data, system log messages, standard output and errors for various services in RebornOS. The problem is that over the time, these logs take a considerable amount of disk space. You can check the log size with this command:
journalctl --disk-usage
Now, there are ways to clean systemd journal logs. The easiest for you is to clear the logs that are older than a certain days.
sudo journalctl --vacuum-time=3d
Learn how to use BleachBit here.
As we use our system, the cache will fill up and take up a lot of space. So, the first thing you probably would want to do is to clean cache in your user directory. If you want to check the size of your cache folder you can do it with this command:
sudo du -sh ~/.cache/
To clean it you need to remove all files inside it:
rm -rf ~/.cache/*
And that is it.
You can check what the largest files in your system are and maybe you do not need them. To accomplish this task, you can use some command line tools or graphical programs.
If you are using GNOME you can use baobab
. There are some other tools listed on the Arch Wiki:
¶ Console
- duc — A library and suite of tools for inspecting disk usage.
https://duc.zevv.nl/ || ducAUR
- gdu — Disk usage analyzer with console interface written in Go.
https://github.com/Dundee/gdu || gduAUR
- gt5 — Diff-capable "du-browser".
http://gt5.sourceforge.net || gt5AUR
- ncdu — Simple ncurses disk usage analyzer.
https://dev.yorhel.nl/ncdu || ncdu
¶ Graphical
- Filelight — Disk usage analyzer that creates an interactive map of concentric, segmented rings that help visualise disk usage on your computer.
https://apps.kde.org/filelight/ || filelight
- GNOME Disk Usage Analyzer — Disk usage analyzer for the GNOME desktop to check folder sizes and available disk space.
https://wiki.gnome.org/Apps/DiskUsageAnalyzer || baobab
- Graphical Disk Map — Disk usage analyzer that draws a map of rectangles sized according to file or dir sizes.
http://gdmap.sourceforge.net/ || gdmap
- fsview (part of Konqueror) — KDE based disk usage analyzer that draws a map of rectangles sized according to file or dir sizes.
https://docs.kde.org/trunk5/en/konqueror/konqueror/view-extensions.html || konqueror
- MATE Disk Usage Analyzer — Disk usage analyzing tool for MATE Desktop.
https://github.com/mate-desktop/mate-utils || mate-utils
- qdirstat — Qt-based directory statistics (KDirStat/K4DirStat without any KDE - from the original KDirStat author).