David K. Bainbridge | a677d4e | 2016-09-11 20:01:32 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | docker kill $(docker ps -q) |
| 4 | docker rm -f $(docker ps -aq) |
| 5 | docker rmi -f $(docker images -aq) |
| 6 | |
| 7 | sudo apt-get remove --purge -y bind9 apache2 docker-engine ansible $(dpkg --get-selections | grep maas | cut -f1) |
| 8 | |
| 9 | sudo rm -rf \ |
| 10 | /etc/maas \ |
| 11 | /etc/bind \ |
| 12 | /etc/apache2 \ |
| 13 | /var/www \ |
| 14 | /var/log/maas \ |
| 15 | /var/lib/maas \ |
| 16 | /etc/apt/apt.conf.d/02apt-cacher-ng \ |
| 17 | /etc/apt/sources.list.d/apt_dockerproject_org_repo.list \ |
| 18 | /etc/apt/sources.list.d/ppa_juju_stable_trusty.list \ |
| 19 | /etc/apt/sources.list.d/docker.list \ |
| 20 | /etc/apt/sources.list.d/ppa_maas_stable_trusty.list \ |
| 21 | /etc/apt/sources.list.d/ppa_ansible_ansible_trusty.list \ |
| 22 | /etc/network/if-pre-up.d/nat \ |
| 23 | /docker-registry \ |
| 24 | /docker-registry-mirror |
| 25 | |
| 26 | sudo apt-get update -y |
| 27 | |
| 28 | # remove NAT rules |
| 29 | sudo iptables --table nat --delete POSTROUTING --out-interface eth3 -j MASQUERADE |
| 30 | sudo iptables --delete FORWARD --in-interface mgmtbr -j ACCEPT |
| 31 | |