From ce5eb8f7fddaf8677682f307fe699c3c41c4fa78 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Sat, 4 Nov 2023 21:47:59 +0100 Subject: [PATCH] Remove unused script --- .../_scripts/.scripts/cleandependencies.sh | 26 ------------------- 1 file changed, 26 deletions(-) delete mode 100755 arch/stow/_scripts/.scripts/cleandependencies.sh diff --git a/arch/stow/_scripts/.scripts/cleandependencies.sh b/arch/stow/_scripts/.scripts/cleandependencies.sh deleted file mode 100755 index 7fac670..0000000 --- a/arch/stow/_scripts/.scripts/cleandependencies.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -# Remove unused dependencies that are not explicitly installed -# Usage: [sudo] cleandependencies - -# Retrieve a list of all packages that are not explicitly installed and are not needed by anything else. -# Note that optional dependencies also do not get removed. -# function getList () { -# grep "Name\|Required By\|Optional For\|Install Reason" <<< $(pacman -Qi) | -# tr '\n' ';' | sed "s/$/\n/" | -# sed "s/ */ /g" | -# sed "s/Name/\nName/g" | -# sed "s/\(Name\|Required By\|Optional For\|Install Reason\) : //g" | -# grep "Installed as a dependency for another package" | -# grep "^[^;]*;None;None" | -# cut -f 1 -d ';' -# } ; export -f getList - -current_amount=$(pacman -Qdtq | wc -l) -# Keep looping while there are unusded dependencies. -# Stop when the next amount is the same, probably because the action was canceled. -while [[ ${current_amount} -ne 0 && ${current_amount} -ne ${previous_amount:=0} ]] ; do - previous_amount=${current_amount} - pacman -R $(pacman -Qdtq) - current_amount=$(pacman -Qdtq | wc -l) -done -