Created
May 4, 2016 14:15
-
-
Save PeteLawrence/05190ea897648ab38f200d84a4cbe687 to your computer and use it in GitHub Desktop.
Cleans up a vagrant box, ready for packaging
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
#!/bin/bash | |
# Based on https://scotch.io/tutorials/how-to-create-a-vagrant-base-box-from-an-existing-one | |
# Clear the apt-get cache | |
sudo apt-get clean | |
# Zero out the drive | |
sudo dd if=/dev/zero of=/EMPTY bs=1M | |
sudo rm -f /EMPTY | |
# Reset the shell history and exit | |
cat /dev/null > ~/.bash_history && history -c && exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment