Installed packages top to bottom (pacgraph)

Keeping this tool in my arsenal.

$ yay -Ss pacgraph
aur/pacgraph 20110629-10 (+24 1.75)
Draws a graph of installed packages to PNG/SVG/GUI/console. Good for finding bloat.

It had me at ‘finding bloat.’ Lists your Whole Enchilada of packages from top to bottom. Lots of stuff I can remove that I used a couple times like Epiphany for example.

My top ten biggest and top ten smallest (I have a 260 byte program!):

$ sudo pacgraph -c
532.9 MB libreoffice-fresh
519.5 MB trougnouf-backgrounds
410.0 MB etcher-bin
393.1 MB ungoogled-chromium-bin
375.3 MB librewolf-bin
359.5 MB linux-firmware
331.8 MB noto-fonts-extra
300.8 MB base-devel
298.8 MB noto-fonts-cjk
265.8 MB freetube-bin

35 kB eos-rankmirrors
33 kB xorg-xdpyinfo
21 kB kernel-install-for-dracut
17 kB lsb-release
17 kB xorg-xkill
13 kB endeavouros-keyring
3 kB eos-hooks
3 kB endeavouros-mirrorlist
1 kB pipewire-alsa
260 B eos-settings-cinnamon

that background package of wallpapers too unique to pitch but Etcher I can also remove. Don’t use that much.

Review: nifty AUR tool for finding clutter

LC_ALL=C.UTF-8 pacman -Qi | awk '/^Name/{name=$3} /^Installed Size/{print $4$5, name}' | LC_ALL=C.UTF-8 sort -h

As a function (like in .bashrc);

pacszs() {
    LC_ALL=C.UTF-8 pacman -Qi | awk '/^Name/{name=$3} /^Installed Size/{print $4$5, name}' | LC_ALL=C.UTF-8 sort -h
}

Then you may run pacszs.

Or pacszs | tac to reverse the list.

No extra install required. :grin:

Wiki Link: https://wiki.archlinux.org/title/Pacman/Tips_and_tricks#With_size

3 Likes

I knew there was a way around the AUR, just didn’t know what it was :grin:

1 Like

Doesn’t seem to have had updates in at least 13 years (one minor update last year).

Is there a tutorial on how to use it? Is it a GUI app or CLI?

supposed to be a GUI but I don’t see it. I am using the CLI.

For some reason I like this better than going thru everything in my menu (for bloat/unwanted)

EDIT: 1 in 13 years a red flag maybe

1 Like

Another small script into ~/.bashrc:

pacszs() {
    # option -r or --reverse will reverse the output
    expac -HM "%m|%n" | column -t -s'|' | sort -n $1
}
1 Like

Added -r to sort to get to the “heavy weights” first.
At place number one (among 956): 375.15 MiB chromium

And you gotta love these little guys at the bottom of the list

0.01 MiB    rebuild-detector
0.01 MiB    python-certifi
0.01 MiB    perl-http-date
0.01 MiB    gsettings-system-schemas
0.01 MiB    ca-certificates-utils
0.01 MiB    adwaita-color-schemes

(Then I have a couple of Flatpak apps too :blush:)

1 Like

About the same as @manuel :

alias bigpac
bigpac='expac -H M '\''%m\t%n'\'' | sort -rh | head -15'