Skip to content

Commit

Permalink
Added uninstall script (#927)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneTR authored Sep 30, 2024
1 parent 2408343 commit 49c7f24
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions uninstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash
set -euo pipefail

echo "Please note that this script does not remove pre-requisites like gcc, docker, curl etc. as it does not want to alter the system state"

function uninstall_python() {
python3 -m pip uninstall -y -r requirements.txt
python3 -m pip uninstall -y -r requirements-dev.txt
python3 -m pip uninstall -y -r docker/requirements.txt
python3 -m pip uninstall -y -r metric_providers/psu/energy/ac/xgboost/machine/model/requirements.txt
}

source venv/bin/activate

uninstall_python

deactivate

uninstall_python

rm -fR .

docker rmi nginx
docker rmi postgres:15
docker rmi docker-test-green-coding-gunicorn
docker rmi docker-green-coding-gunicorn
docker system prune

if [[ $(uname) == "Linux" ]]; then
if lsb_release -is | grep -q "Fedora"; then
sudo dnf -y install msr-tools lm_sensors lm_sensors-devel glib2 glib2-devel tinyproxy stress-ng lshw ipmitool
else
sudo apt remove lm-sensors libsensors-dev libglib2.0-0 libglib2.0-dev tinyproxy stress-ng lshw freeipmi-tools ipmitool msr-tools -y
fi
fi

0 comments on commit 49c7f24

Please sign in to comment.