blob: 857c7d93fbd74e3e5f91dcd5106d5e22111e158f [file] [log] [blame]
Richard Felkld59c5652018-02-08 13:14:05 +01001#!/bin/bash -xe
2apt-get -y autoremove --purge
3apt-get -y clean
4rm -rf /var/lib/apt/lists/*
5
6rm -f /usr/sbin/policy-rc.d || true
7
8echo "cleaning up hostname"
azvyagintsevc86fbaf2018-03-02 18:57:03 +02009sed -i "/.*ubuntu.*/d" /etc/hosts
10sed -i "/.*salt.*/d" /etc/hosts
Richard Felkld59c5652018-02-08 13:14:05 +010011
12echo "cleaning up guest additions"
13rm -rf VBoxGuestAdditions_*.iso VBoxGuestAdditions_*.iso.? || true
14
15echo "cleaning up dhcp leases"
16rm -rf /var/lib/dhcp/* || true
17
18echo "cleaning up udev rules"
19rm -f /etc/udev/rules.d/70-persistent-net.rules || true
20rm -rf /dev/.udev/ || true
21rm -f /lib/udev/rules.d/75-persistent-net-generator.rules || true
22
23echo "cleaning up minion_id for salt"
24rm -f /etc/salt/minion_id || true
25
Richard Felkl47757902018-03-02 22:44:43 +010026echo "cleaning up resolvconf"
27sed -i '/172\.18\.208\.44/d' /etc/resolvconf/resolv.conf.d/base