#!/bin/bash ################################################################################ # Performs a FULL uninstall # ################################################################################ # source vars source vars # remove nginx conf echo "Disabling nginx" systemctl stop nginx 1> /dev/null 2> /dev/null systemctl disable nginx 1> /dev/null 2> /dev/null # remove python echo "Uninstalling Python" for dir in $(whereis python3 | tr " " "\n" | grep usr/local/bin | tr "\n" " "); do rm -r $dir; done; # remove sqlite echo "Uninstalling Sqlite3" for dir in $(whereis sqlite3 | tr " " "\n" | grep usr/local/bin | tr "\n" " "); do rm -r $dir; done; # remove yum dependencies echo "Uninstalling dependencies" for package in ${packages[@]}; do echo -e "\tRemoving $package" apt purge -y $package 1>> /dev/null 2>> /dev/null 3>> /dev/null if [ $? -ne 0 ] ; then echo -e "\tapt failed to remove $package." fi done