Carmelo Cascone | d661507 | 2017-12-15 00:53:43 -0800 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | set -xe |
| 4 | |
Carmelo Cascone | d661507 | 2017-12-15 00:53:43 -0800 | [diff] [blame] | 5 | # Free space on disk |
Carmelo Cascone | 2b8bcbc | 2019-04-23 13:50:03 -0700 | [diff] [blame] | 6 | sudo rm -rf ~/p4tools |
Charles Chan | 84431b9 | 2018-08-16 20:30:09 -0700 | [diff] [blame] | 7 | sudo rm -rf ~/quagga |
Carmelo Cascone | 2b8bcbc | 2019-04-23 13:50:03 -0700 | [diff] [blame] | 8 | sudo rm -rf ~/mininet |
| 9 | sudo rm -rf ~/.mininet_history |
| 10 | sudo rm -rf ~/.viminfo |
| 11 | sudo rm -rf ~/.ssh |
| 12 | sudo rm -rf ~/.cache/pip |
Carmelo Cascone | d661507 | 2017-12-15 00:53:43 -0800 | [diff] [blame] | 13 | |
Carmelo Cascone | 57defd3 | 2018-05-11 14:34:01 -0700 | [diff] [blame] | 14 | sudo apt-get clean |
Carmelo Cascone | c5569c2 | 2018-04-18 10:09:15 +0900 | [diff] [blame] | 15 | sudo apt-get -y autoremove |
Carmelo Cascone | 2b8bcbc | 2019-04-23 13:50:03 -0700 | [diff] [blame] | 16 | |
| 17 | sudo rm -rf /tmp/* |
Carmelo Cascone | c5569c2 | 2018-04-18 10:09:15 +0900 | [diff] [blame] | 18 | |
Carmelo Cascone | 57defd3 | 2018-05-11 14:34:01 -0700 | [diff] [blame] | 19 | # Zerofill virtual hd to save space when exporting |
| 20 | time sudo dd if=/dev/zero of=/tmp/zero bs=1M || true |
| 21 | sync ; sleep 1 ; sync ; sudo rm -f /tmp/zero |
| 22 | |
| 23 | history -c |
| 24 | rm -f ~/.bash_history |
cmo | f1a0400 | 2019-06-14 16:06:12 +0800 | [diff] [blame] | 25 | |
| 26 | # Delete vagrant user |
| 27 | sudo userdel -r -f vagrant |
| 28 | |