blob: 754691ced9ae73feb79efc7d48e0ee006ac8d3a4 [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 Casconea4dc3c12019-02-12 17:30:00 -08009sudo rm -rf ~/p4tools/protobuf*
10sudo rm -rf ~/p4tools/grpc*
Carmelo Cascone95e5afd2018-07-17 14:45:23 +020011sudo rm -rf ~/p4tools/bmv2
12sudo rm -rf ~/p4tools/PI
13sudo rm -rf ~/p4tools/p4c
Carmelo Cascone95e5afd2018-07-17 14:45:23 +020014sudo rm -rf ~/p4tools/scapy-vxlan
15sudo rm -rf ~/p4tools/ptf
Charles Chan84431b92018-08-16 20:30:09 -070016sudo rm -rf ~/quagga
Carmelo Casconed6615072017-12-15 00:53:43 -080017
Carmelo Cascone57defd32018-05-11 14:34:01 -070018sudo apt-get clean
Carmelo Casconec5569c22018-04-18 10:09:15 +090019sudo apt-get -y autoremove
Carmelo Cascone95e5afd2018-07-17 14:45:23 +020020sudo sudo rm -rf /tmp/*
Carmelo Casconec5569c22018-04-18 10:09:15 +090021
Carmelo Cascone57defd32018-05-11 14:34:01 -070022# Zerofill virtual hd to save space when exporting
23time sudo dd if=/dev/zero of=/tmp/zero bs=1M || true
24sync ; sleep 1 ; sync ; sudo rm -f /tmp/zero
25
26history -c
27rm -f ~/.bash_history