Skip to content

Commit d9b99df

Browse files
chore: increase the robustness of the uninstall script (#1704)
* chore: increase the robustness of the uninstall script * Update uninstall_all.sh
1 parent 1fcdcf9 commit d9b99df

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

scripts/uninstall_all.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
#!/bin/bash
22

3-
pip uninstall -y slack-sdk && \
4-
pip freeze | grep -v "^-e" | sed 's/@.*//' | sed 's/\=\=.*//' | xargs pip uninstall -y
3+
# remove slack-sdk without a version specifier so that local builds are cleaned up
4+
pip uninstall -y slack-sdk
5+
# collect all installed packages
6+
PACKAGES=$(pip freeze | grep -v "^-e" | sed 's/@.*//' | sed 's/\=\=.*//')
7+
# uninstall packages without exiting on a failure
8+
for package in $PACKAGES; do
9+
pip uninstall -y $package
10+
done

0 commit comments

Comments
 (0)