This repository has been archived by the owner on Oct 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 100
/
uninstall
executable file
·46 lines (41 loc) · 1.56 KB
/
uninstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
# Graphite uninstall script for Ubuntu 14.04 x64
# Jason Dixon <[email protected]>
/usr/local/bin/carbon-cache stop
service memcached stop
service collectd stop
service apache2 stop
service statsite stop
systemctl stop grafana-server
systemctl disable grafana-server
# Remove various binaries, configuration files, and source directories
rm /usr/local/sbin/statsite*
rm /etc/statsite.conf
pip3 uninstall -y -r /usr/local/src/graphite-web/requirements.txt
pip3 uninstall -y -r /usr/local/src/carbon/requirements.txt
rm -r /opt/graphite
rm -r /usr/local/src/graphite-web
rm -r /usr/local/src/carbon
rm -r /usr/local/src/whisper
rm -r /usr/local/src/statsite
rm /usr/local/bin/*whisper*.py
rm /usr/local/lib/python2.7/dist-packages/whisper*
rm /etc/apache2/sites-*/graphite.conf
/usr/local/bin/carbon-cache disable
systemctl disable statsite
systemctl disable grafana-server
rm -rf /etc/systemd/system/carbon*
rm -rf /etc/systemd/system/statsite*
systemctl daemon-reload
rm /etc/cron.hourly/graphite-build-index
# Uninstall our package dependencies and purge configurations
apt-get purge -y python3-cairo python3-django python3-django-tagging python3-twisted python3-zope.interface \
fontconfig apache2 libapache2-mod-wsgi-py3 python3-pysqlite2 python3-simplejson python3-memcache \
git-core collectd memcached gcc g++ make libtool automake grafana
apt autoremove -y
# Brute force cleanup on the collectd configuration directory
rm -r /etc/collectd
# Remove our system user for Carbon
pkill -9 -f carbon-cache
userdel carbon
rm /usr/local/bin/carbon-cache