Created
February 14, 2016 03:13
-
-
Save poad/e21335ca532799446667 to your computer and use it in GitHub Desktop.
Vagrant boxを小さくする ref: http://qiita.com/poad1010/items/6d15bd8d46967c1fd031
This file contains hidden or 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
sudo su - | |
umount /vagrant | |
aptitude autoclean && apt-get autoremove && apt-get clean | |
find /var/log -type f | while read f; do echo -ne ‘’ > $f; done && rm -rf /var/log/* /tmp/* /var/tmp/* /usr/local/src/* /var/ww/html | |
e4defrag / && dd if=/dev/zero of=/EMPTY bs=1M; rm -f /EMPTY | |
rm /root/.bash_history && /home/vagrant/.bash_history | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment