blob: d4e28fb53306dd261f52178187397dd2253d7b84 [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 Cascone57defd32018-05-11 14:34:01 -07009rm -rf ~/p4tools/protobuf
10rm -rf ~/p4tools/grpc
11rm -rf ~/p4tools/bmv2
12rm -rf ~/p4tools/p4runtime
13rm -rf ~/p4tools/p4c
14rm -rf ~/p4tools/libyang
15rm -rf ~/p4tools/sysrepo
Carmelo Casconed6615072017-12-15 00:53:43 -080016
Carmelo Cascone57defd32018-05-11 14:34:01 -070017sudo apt-get clean
Carmelo Casconec5569c22018-04-18 10:09:15 +090018sudo apt-get -y autoremove
Carmelo Cascone57defd32018-05-11 14:34:01 -070019sudo rm -rf /tmp/*
Carmelo Casconec5569c22018-04-18 10:09:15 +090020
Carmelo Cascone57defd32018-05-11 14:34:01 -070021# Zerofill virtual hd to save space when exporting
22time sudo dd if=/dev/zero of=/tmp/zero bs=1M || true
23sync ; sleep 1 ; sync ; sudo rm -f /tmp/zero
24
25history -c
26rm -f ~/.bash_history