diff options
Diffstat (limited to 'scriptlets/springcleaning.sh')
-rwxr-xr-x | scriptlets/springcleaning.sh | 34 |
1 files changed, 34 insertions, 0 deletions
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) |