forked from obfuscurity/synthesize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
uninstall
executable file
·38 lines (33 loc) · 1.31 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
#!/bin/bash
# Graphite uninstall script for Ubuntu 14.04 x64
# Jason Dixon <[email protected]>
service carbon-cache stop
service memcached stop
service collectd stop
service apache2 stop
service statsite stop
# Remove various binaries, configuration files, and source directories
rm /usr/local/sbin/statsite*
rm /etc/statsite.conf
pip uninstall -y -r /usr/local/src/graphite-web/requirements.txt
pip uninstall -y -r /usr/local/src/carbon/requirements.txt
pip uninstall --egg SCons
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
rm /etc/init/graphite.conf
rm /etc/init/statsite.conf
rm /etc/cron.hourly/graphite-build-index
# Uninstall our package dependencies and purge configurations
apt-get purge -y python-cairo python-django python-django-tagging python-twisted python-zope.interface fontconfig apache2 libapache2-mod-wsgi python-pysqlite2 python-simplejson python-memcache git-core collectd memcached gcc g++ make libtool automake
apt-get 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