Cleaning manjaro

@cfinnberg had some good recommendations if you are looking to keep things “clean”. Me too :slight_smile: I would like to add that you don’t need to manually run pamac clean because there is a systemd timer setup. systemctl list-timers will show pamac-cleancache. The number of packages to keep in cache can be set via the pamac GUI or setting KeepNumPackages in /etc/pamac.conf.

You’ll definitely want to set something to manage the journal.

One issue I run into is keeping track of when packages get moved to the AUR. I use the command below to show packages that are installed on the system that do not exist in the sync respository. The packages were either installed on purpose from the AUR or were moved to the AUR. The recent update showed, “ceph, ceph-libs and ceph-mgr dropped to the AUR”, but packages aren’t always listed in the announcement.

comm -3 <(pacman -Sl | grep installed | cut -d ' ' -f2 | sort) <(pacman -Q | cut -d' ' -f1 | sort)

On a virtual machine, I was able to get the orphans down to 0 (I could restore it if needed), but it is not without some work. I removed using pacman -Rns. On my main machine I have 54 orphan packages that I’m going to rewiew. Of those, I know I need to keep 10 of them. I’m going to pay more attention when I add and remove packages.

This is what I did. I took the list of orphans (use --quiet), minus the ones I wanted to keep (grep -E -v -e (p1|p2)), and piped that to pacman -Sii | grep -E -e '(Name|Required By)'. I double verified using pactree -r pkg. I also checked the logs using grep pkg /rootfs-pkgs.txt /desktopfs-pkgs.txt /var/log/pacman.log to see when the package was installed and in what context. I rebooted and everything seems to be working :slight_smile: But if in doubt, leave it, and hopefully future installs will shake things out nicely.