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 | 95e5afd | 2018-07-17 14:45:23 +0200 | [diff] [blame] | 9 | sudo rm -rf ~/p4tools/protobuf |
| 10 | sudo rm -rf ~/p4tools/grpc |
| 11 | sudo rm -rf ~/p4tools/bmv2 |
| 12 | sudo rm -rf ~/p4tools/PI |
| 13 | sudo rm -rf ~/p4tools/p4c |
| 14 | sudo rm -rf ~/p4tools/libyang |
| 15 | sudo rm -rf ~/p4tools/sysrepo |
| 16 | sudo rm -rf ~/p4tools/scapy-vxlan |
| 17 | sudo rm -rf ~/p4tools/ptf |
Charles Chan | 84431b9 | 2018-08-16 20:30:09 -0700 | [diff] [blame] | 18 | sudo rm -rf ~/quagga |
Carmelo Cascone | d661507 | 2017-12-15 00:53:43 -0800 | [diff] [blame] | 19 | |
Carmelo Cascone | 57defd3 | 2018-05-11 14:34:01 -0700 | [diff] [blame] | 20 | sudo apt-get clean |
Carmelo Cascone | c5569c2 | 2018-04-18 10:09:15 +0900 | [diff] [blame] | 21 | sudo apt-get -y autoremove |
Carmelo Cascone | 95e5afd | 2018-07-17 14:45:23 +0200 | [diff] [blame] | 22 | sudo sudo rm -rf /tmp/* |
Carmelo Cascone | c5569c2 | 2018-04-18 10:09:15 +0900 | [diff] [blame] | 23 | |
Carmelo Cascone | 57defd3 | 2018-05-11 14:34:01 -0700 | [diff] [blame] | 24 | # Zerofill virtual hd to save space when exporting |
| 25 | time sudo dd if=/dev/zero of=/tmp/zero bs=1M || true |
| 26 | sync ; sleep 1 ; sync ; sudo rm -f /tmp/zero |
| 27 | |
| 28 | history -c |
| 29 | rm -f ~/.bash_history |