blob: bcde882450f0594d262ad032ebe051a9e084dc08 [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 Casconeada7b5b2019-04-23 13:50:03 -07009sudo rm -rf ~/p4tools
Charles Chan84431b92018-08-16 20:30:09 -070010sudo rm -rf ~/quagga
Carmelo Casconeada7b5b2019-04-23 13:50:03 -070011sudo rm -rf ~/mininet
12sudo rm -rf ~/.mininet_history
13sudo rm -rf ~/.viminfo
14sudo rm -rf ~/.ssh
15sudo rm -rf ~/.cache/pip
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 Casconeada7b5b2019-04-23 13:50:03 -070019
20sudo 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