Skip to content

Commit 87aa070

Browse files
committed
feat: add clean command
1 parent eeb56b8 commit 87aa070

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

lib/clean.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
source $lib_dir/helper_functions.sh
2+
3+
DefineDistro
4+
5+
if [[ $distro == "arch" ]]; then
6+
sudo pacman -Rns --noconfirm $(pacman -Qdtq)
7+
elif [[ $distro == "debian" ]]; then
8+
sudo apt-get autoremove --purge -y
9+
fi

lib/main.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Usage:
88
99
Options:
1010
apply Apply the configuration from ~/.config/setuper/
11+
clean Clean unused packages
1112
"
1213
else
1314
readonly lib_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
@@ -21,6 +22,9 @@ else
2122
apply)
2223
source $lib_dir/apply.sh
2324
;;
25+
clean)
26+
source $lib_dir/clean.sh
27+
;;
2428
*)
2529
echo "Invalid option"
2630
;;

0 commit comments

Comments
 (0)