Richard Felkl | d59c565 | 2018-02-08 13:14:05 +0100 | [diff] [blame] | 1 | #!/bin/bash -xe |
| 2 | apt-get -y autoremove --purge |
| 3 | apt-get -y clean |
| 4 | rm -rf /var/lib/apt/lists/* |
| 5 | |
| 6 | rm -f /usr/sbin/policy-rc.d || true |
| 7 | |
| 8 | echo "cleaning up hostname" |
azvyagintsev | c86fbaf | 2018-03-02 18:57:03 +0200 | [diff] [blame] | 9 | sed -i "/.*ubuntu.*/d" /etc/hosts |
| 10 | sed -i "/.*salt.*/d" /etc/hosts |
Richard Felkl | d59c565 | 2018-02-08 13:14:05 +0100 | [diff] [blame] | 11 | |
| 12 | echo "cleaning up guest additions" |
| 13 | rm -rf VBoxGuestAdditions_*.iso VBoxGuestAdditions_*.iso.? || true |
| 14 | |
| 15 | echo "cleaning up dhcp leases" |
| 16 | rm -rf /var/lib/dhcp/* || true |
| 17 | |
| 18 | echo "cleaning up udev rules" |
| 19 | rm -f /etc/udev/rules.d/70-persistent-net.rules || true |
| 20 | rm -rf /dev/.udev/ || true |
| 21 | rm -f /lib/udev/rules.d/75-persistent-net-generator.rules || true |
| 22 | |
| 23 | echo "cleaning up minion_id for salt" |
| 24 | rm -f /etc/salt/minion_id || true |
| 25 | |
Richard Felkl | 4775790 | 2018-03-02 22:44:43 +0100 | [diff] [blame^] | 26 | echo "cleaning up resolvconf" |
| 27 | sed -i '/172\.18\.208\.44/d' /etc/resolvconf/resolv.conf.d/base |