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