From 14a892e627a375334a02381351f139d94ad7ecf3 Mon Sep 17 00:00:00 2001 From: ダカマ Date: Mon, 2 Jun 2025 13:08:46 +0200 Subject: First dump --- scriptlets/springcleaning.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 scriptlets/springcleaning.sh (limited to 'scriptlets/springcleaning.sh') diff --git a/scriptlets/springcleaning.sh b/scriptlets/springcleaning.sh new file mode 100755 index 0000000..781a0b9 --- /dev/null +++ b/scriptlets/springcleaning.sh @@ -0,0 +1,34 @@ +#!/bin/sh + + +# keeping a fresh list of all explicitly installed packages + +pacman -Qqe > "/home/jay/stuf/ARESEES/pkglist.txt" +pacman -Qqen > "/home/jay/stuf/ARESEES/pkglist_native.txt" +pacman -Qqem > "/home/jay/stuf/ARESEES/pkglist_foreign.txt" + +# pacman -S --needed - < pkglist.txt to install them +# pacman -S --needed $(comm -12 <(pacman -Slq | sort) <(sort pkglist.txt)) to filter out the AUR ones +# pacman -Rsu $(comm -23 <(pacman -Qq | sort) <(sort pkglist.txt)) final check to make sure only listed packages are present on the system + +# ----------------------------------------------------------------------------------------------------------------------------- + +# removing all but 3 most recent package versions + +paccache -r +paccache -ruk0 # every version if said package is uninstalled + +# you can enable/start paccache.timer for the first one to happen automatically + +# ----------------------------------------------------------------------------------------------------------------------------- + +# removing orphaned packages + +pacman -Qtdq | pacman -Rns - + +# will throw an error if list is empty, this is fine +# pacman -Qqd | pacman -Rsu --print - does the same as above(?) but also hits circular and excessive dependencies + +# ----------------------------------------------------------------------------------------------------------------------------- + +# figure something out for dotfiles (google: rmshit.py) -- cgit v1.2.3