Guest User

Untitled

a guest
Jan 18th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. To clean up disk space on the VM so when we package it into a new Vagrant box, it’s as clean as possible. First, remove APT cache
  2.  
  3. ```shell
  4. $ sudo apt-get clean
  5. ```
  6.  
  7. Then, “zero out” the drive (this is for Ubuntu):
  8.  
  9. ```shell
  10. $ sudo dd if=/dev/zero of=/EMPTY bs=1M
  11. $ sudo rm -f /EMPTY
  12. ```
  13.  
  14. ```shell
  15. $ cat /dev/null > ~/.bash_history && history -c && exit
  16. ```
  17.  
  18. ```shell
  19. $ vagrant package --output mynew.box
  20. ```
Add Comment
Please, Sign In to add comment