linux is a miracle (day 1429)

these are some of the packages i have installed: the flutter SDK, thorium, chromium, obsidian (electron), inkscape, kdenlive, thunderbird email client, floorp, krita, wine-staging, obs studio, qbittorrent, beeper (electron), simplescreenrecorder, lutris, audacity, handbrake, kate. these are the big ones. i have a bunch of little command-line tools too: eza, aria2, ncdu, tty-clock, yay, hyperfine, yazi etc.

and all of this fits in ~8 gigs.

size of root (df output).
size of root (df output).

what i did #

  • use btrfs compression. (compress=zstd:3 in /etc/fstab)
  • remove packages not required anymore.
    • some packages are now split into multiple packages (eg. linux-firmware), so pick only the ones you need.
  • clear the pacman cache with sudo pacman -Scc.
    • not really a good idea tbh, because you wouldn’t be able to downgrade if your pc has some problem, so you’d have to live boot, chroot into the installation and fix. but i have cleared the cache clean for like 3-4 years at this point, and nothing ever went wrong. i guess i’m lucky.
  • clear old journal logs with sudo journalctl --vacuum-time=3days.
    • the given command retains logs of the past three days and deletes everything else, so if you need more logs, adjust the vacuum time accordingly, or just don’t touch it. (lmao)
  • clear unwanted locales.
    • all these locales in /usr/share/locales were taking up 800 megs, and i only use english. cleared it with bleachbit.
    • NB: be careful while using bleachbit. before cleaning, be sure to disable cookies, saved passwords of your browser, and disable the free space option as well.
  • clear coredumps in /var/lib/systemd/coredump.
    • well, not all, there was a lot of stuff from programs i didn’t use anymore. this prolly won’t be good advice, but anyway.

tools i used to monitor #

  • ncdu
    • amazing tool, but be careful while deleting.
  • df
    • part of coreutils.
    • use df -h to see total, available and used space of partitions.
  • pacgraph -c
    • installed from AUR.
    • when executed with the -c flag, prints a list of packages with their size in descending order.
    • ditch the -c flag and it renders an SVG. (i don’t use it.)
    • pacgraph -c | less or pacgraph -c | nvim -R for ez.