-
-
Save rubenmromero/43d7674a338ce426eadfc8fa757f79f0 to your computer and use it in GitHub Desktop.
Bash :: Vagrant Box Cleaner for CentOS / Red Hat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clear yum packages | |
yum clean all | |
# Zero out the free space to save space in the final image: | |
dd if=/dev/zero of=/EMPTY bs=1M | |
rm -f /EMPTY | |
# Removing leftover leases and persistent rules | |
echo "cleaning up dhcp leases" | |
rm -f /var/lib/dhclient/* | |
# Make sure Udev doesn't block our network | |
echo "cleaning up udev rules" | |
rm -rf /etc/udev/rules.d/70-persistent-net.rules | |
mkdir /etc/udev/rules.d/70-persistent-net.rules | |
rm -rf /dev/.udev/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment