-
Notifications
You must be signed in to change notification settings - Fork 4
/
cleanup.sh
executable file
·36 lines (31 loc) · 1.13 KB
/
cleanup.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
#!/usr/bin/env bash
set -x
set -e
# This script is only necessary if you are using the Cloud in a Box
# repository on a preinstalled Ubuntu and the osism/node image has
# not served as the basis for it.
systemctl stop apt-daily-upgrade.timer
systemctl stop apt-daily.timer
systemctl stop motd-news.timer
systemctl stop multipathd.socket
systemctl stop multipathd.service
systemctl stop ufw.service
systemctl stop unattended-upgrades.service
systemctl disable apt-daily-upgrade.timer
systemctl disable apt-daily.timer
systemctl disable motd-news.timer
systemctl disable multipathd.socket
systemctl disable multipathd.service
systemctl disable ufw.service
systemctl disable unattended-upgrades.service
apt purge --yes snapd modemmanager lxd-agent-loader frr
apt purge --yes plymouth plymouth-theme-ubuntu-text
apt purge --yes ubuntu-advantage-tools xauth landscape-common btrfs-progs
apt purge --yes apport apport-symptoms open-vm-tools ntfs-3g
apt purge --yes telnet pastebinit tnftp ftp open-iscsi bolt packagekit
apt autoremove --yes --purge
if [[ -e /swap.img ]]; then
swapoff /swap.img
rm /swap.img
sed -i '/swap.img/d' /etc/fstab
fi