blob: 0718dd8912fe82107af83c360c6138fa8aa96ee8 [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
Carmelo Casconed6615072017-12-15 00:53:43 -080018
Carmelo Cascone57defd32018-05-11 14:34:01 -070019sudo apt-get clean
Carmelo Casconec5569c22018-04-18 10:09:15 +090020sudo apt-get -y autoremove
Carmelo Cascone95e5afd2018-07-17 14:45:23 +020021sudo sudo rm -rf /tmp/*
Carmelo Casconec5569c22018-04-18 10:09:15 +090022
Carmelo Cascone57defd32018-05-11 14:34:01 -070023# Zerofill virtual hd to save space when exporting
24time sudo dd if=/dev/zero of=/tmp/zero bs=1M || true
25sync ; sleep 1 ; sync ; sudo rm -f /tmp/zero
26
27history -c
28rm -f ~/.bash_history