Created
December 16, 2014 06:42
-
-
Save pedroamador/76b4d068108d13cf52b4 to your computer and use it in GitHub Desktop.
Vagrant BOX Cleaner Centos
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