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 | a4dc3c1 | 2019-02-12 17:30:00 -0800 | [diff] [blame] | 9 | sudo rm -rf ~/p4tools/protobuf* |
| 10 | sudo rm -rf ~/p4tools/grpc* |
Carmelo Cascone | 95e5afd | 2018-07-17 14:45:23 +0200 | [diff] [blame] | 11 | sudo rm -rf ~/p4tools/bmv2 |
| 12 | sudo rm -rf ~/p4tools/PI |
| 13 | sudo rm -rf ~/p4tools/p4c |
Carmelo Cascone | 95e5afd | 2018-07-17 14:45:23 +0200 | [diff] [blame] | 14 | sudo rm -rf ~/p4tools/scapy-vxlan |
| 15 | sudo rm -rf ~/p4tools/ptf |
Charles Chan | 84431b9 | 2018-08-16 20:30:09 -0700 | [diff] [blame] | 16 | sudo rm -rf ~/quagga |
Carmelo Cascone | d661507 | 2017-12-15 00:53:43 -0800 | [diff] [blame] | 17 | |
Carmelo Cascone | 57defd3 | 2018-05-11 14:34:01 -0700 | [diff] [blame] | 18 | sudo apt-get clean |
Carmelo Cascone | c5569c2 | 2018-04-18 10:09:15 +0900 | [diff] [blame] | 19 | sudo apt-get -y autoremove |
Carmelo Cascone | 95e5afd | 2018-07-17 14:45:23 +0200 | [diff] [blame] | 20 | sudo 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 |