Add clean.sh
clean.sh gets rid of all residue of running DevStack except installed
packages and pip modules.
And it eradicates rabbitmq-server and ts erlang dependencies as well as
the other RPC backends and databases.
Change-Id: I2b9a251a0a151c012bae85a5a2f9c2f72e7700be
diff --git a/functions b/functions
index 220da9d..f8f63c5 100644
--- a/functions
+++ b/functions
@@ -775,6 +775,21 @@
}
+# Distro-agnostic package uninstaller
+# uninstall_package package [package ...]
+function uninstall_package() {
+ if is_ubuntu; then
+ apt_get purge "$@"
+ elif is_fedora; then
+ yum remove -y "$@"
+ elif is_suse; then
+ rpm -e "$@"
+ else
+ exit_distro_not_supported "uninstalling packages"
+ fi
+}
+
+
# Distro-agnostic function to tell if a package is installed
# is_package_installed package [package ...]
function is_package_installed() {