blob: 45c6a4179c41a51a9ddc085bb6c088617a3ba1c1 [file] [log] [blame]
Carmelo Casconed6615072017-12-15 00:53:43 -08001#!/usr/bin/env bash
2
3set -xe
4
5# Delete vagrant user
6sudo userdel -r -f vagrant
7
8# Free space on disk
Carmelo Cascone95e5afd2018-07-17 14:45:23 +02009sudo rm -rf ~/p4tools/protobuf
10sudo rm -rf ~/p4tools/grpc
11sudo rm -rf ~/p4tools/bmv2
12sudo rm -rf ~/p4tools/PI
13sudo rm -rf ~/p4tools/p4c
14sudo rm -rf ~/p4tools/libyang
15sudo rm -rf ~/p4tools/sysrepo
16sudo rm -rf ~/p4tools/scapy-vxlan
17sudo rm -rf ~/p4tools/ptf
Charles Chan84431b92018-08-16 20:30:09 -070018sudo rm -rf ~/quagga
Carmelo Casconed6615072017-12-15 00:53:43 -080019
Carmelo Cascone57defd32018-05-11 14:34:01 -070020sudo apt-get clean
Carmelo Casconec5569c22018-04-18 10:09:15 +090021sudo apt-get -y autoremove
Carmelo Cascone95e5afd2018-07-17 14:45:23 +020022sudo sudo rm -rf /tmp/*
Carmelo Casconec5569c22018-04-18 10:09:15 +090023
Carmelo Cascone57defd32018-05-11 14:34:01 -070024# Zerofill virtual hd to save space when exporting
25time sudo dd if=/dev/zero of=/tmp/zero bs=1M || true
26sync ; sleep 1 ; sync ; sudo rm -f /tmp/zero
27
28history -c
29rm -f ~/.bash_history