-
Notifications
You must be signed in to change notification settings - Fork 4
/
all-remove.sh
36 lines (30 loc) · 980 Bytes
/
all-remove.sh
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
#!/bin/sh
DIVIDER="\n***************************************\n\n"
# Remove php, php packages and other apps.
sudo apt-get remove wget nano screen unzip curl software-properties-common apt-transport-https -y
sudo apt-get purge php-* -y
sudo apt-get purge php* -y
# Remove mysql
sudo service stop mysql
sudo apt-get remove mysql-server mysql-client mysql-common -y
sudo apt-get purge mysql-* -y
sudo apt-get purge mysql* -y
sudo rm -rf /usr/bin/mysql
sudo rm -rf /usr/lib/mysql
sudo rm -rf /usr/share/mysql
sudo rm -rf /usr/share/man/man1/mysql.*
sudo rm -rf /etc/mysql
# Remove apache2
sudo service apache2 stop
sudo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common -y
sudo apt-get remove --purge apache2 apache2-utils apach2.2-bin apache2-common -y
# Remove phpmyadmin
sudo rm -rf /usr/share/phpmyadmin
# Auto remove
sudo apt-get autoremove -y
sudo apt-get autoclean -y
sudo rm -rf /tmp/*
# Msg
printf $DIVIDER
printf "Components removed.\n"
printf $DIVIDER