Created
July 15, 2013 00:35
-
-
Save pleckey/5996774 to your computer and use it in GitHub Desktop.
Minimize Ubuntu vagrant box size 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 | |
## | |
# Run as sudo, then exit and package immediately | |
## | |
# Remove unnecessary packages | |
aptitude purge ri | |
aptitude purge installation-report landscape-common wireless-tools wpasupplicant ubuntu-serverguide | |
aptitude purge python-dbus libnl1 python-smartpm linux-headers-2.6.32-21-generic python-twisted-core libiw30 | |
aptitude purge python-twisted-bin libdbus-glib-1-2 python-pexpect python-pycurl python-serial python-gobject python-pam python-openssl libffi5 | |
# Cleanup any other packages | |
aptitude clean | |
# Zero free space to aid VM compression | |
dd if=/dev/zero of=/EMPTY bs=1M | |
rm -f /EMPTY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment