Last active
March 30, 2021 05:29
-
-
Save koshatul/407c09b2aeff92d2bd59533c4ccec983 to your computer and use it in GitHub Desktop.
Uninstall script for portworx.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
## Uninstall portworx on Ubuntu 16.04 (and probably future versions) | |
## curl -sSL 'https://gist.githubusercontent.com/koshatul/407c09b2aeff92d2bd59533c4ccec983/raw/uninstall-portworx.sh' | /bin/bash /dev/stdin -- | |
set +ex | |
sudo systemctl stop portworx | |
sudo systemctl disable portworx | |
sudo rm -f /etc/systemd/system/portworx*.service | |
# 2: Unmount oci (if required) | |
grep -q '/opt/pwx/oci /opt/pwx/oci' /proc/self/mountinfo && sudo umount /opt/pwx/oci | |
# 3: Remove binary files | |
sudo rm -fr /opt/pwx | |
# 4: [OPTIONAL] Remove configuration files. Doing this means UNRECOVERABLE DATA LOSS. | |
sudo rm -fr /etc/pwx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Helpful.