journalctl --vacuum-size=100M #remove all logs, only retain 100mb
pacman -Scc #remove all package installation files (obsolete and current)
pacman -S bleachbit
bleachbit -c system.*
First, what's big on the system
du -d1 -h / 2>/dev/null | sort -h
This shows a sorted list of the largest dirs in `/`
You can do two levels down:
du -d2 -h / 2>/dev/null | sort -h
My result is:
/mnt (because that's an external drive)
Two dirs stand to mind:
Let's see what's inside:
du -d1 -h /var /usr 2>/dev/null | sort -h
Then, a little bit deeper:
du -d1 -h /var/log /usr/share /usr/lib /var/cache 2>/dev/null | sort -h
Let's start with the logs
I have 717mb in
I'm not a fan of deleting directories randomly, so let's do it the clean way:
$ journalctl --disk-usage
Archived and active journals take up 728.7M on disk.
Let's leave only 100mb of logs:
Deleted archived journal /var/log/journal/ba5391...b.journal (8.0M).
Vacuuming done, freed 616.6M of archived journals on disk.
More info here on how to configure journalctl here.
660M /var/cache/pacman. It was 1.8gb, but I ran
pacman -Sc to remove unused packages. Let's remove the rest:
A lot of users do remove it, or at least clean it up. But I might be a problem. But checkout bleachbit (next paragraph).
Automatic cleaner. Will delete a lot of stuff, but for it was mostly locales.
$ pacman -S bleachbit
$ bleachbit -p system.*
Disk space to be recovered: 488.8MB
$ bleachbit -c system.*
You can look for more stuff to delete:
bleachbit -p thunderbird.*