blob: 95fa46860e980794948ea2a77b6d8fe87c4e15c3 [file] [log] [blame]
Carmelo Casconed6615072017-12-15 00:53:43 -08001#!/usr/bin/env bash
2
3set -xe
4
Carmelo Casconed6615072017-12-15 00:53:43 -08005# Free space on disk
Carmelo Cascone2b8bcbc2019-04-23 13:50:03 -07006sudo rm -rf ~/p4tools
Charles Chan84431b92018-08-16 20:30:09 -07007sudo rm -rf ~/quagga
Carmelo Cascone2b8bcbc2019-04-23 13:50:03 -07008sudo rm -rf ~/mininet
9sudo rm -rf ~/.mininet_history
10sudo rm -rf ~/.viminfo
11sudo rm -rf ~/.ssh
12sudo rm -rf ~/.cache/pip
Carmelo Casconed6615072017-12-15 00:53:43 -080013
Carmelo Cascone57defd32018-05-11 14:34:01 -070014sudo apt-get clean
Carmelo Casconec5569c22018-04-18 10:09:15 +090015sudo apt-get -y autoremove
Carmelo Cascone2b8bcbc2019-04-23 13:50:03 -070016
17sudo rm -rf /tmp/*
Carmelo Casconec5569c22018-04-18 10:09:15 +090018
Carmelo Cascone57defd32018-05-11 14:34:01 -070019# Zerofill virtual hd to save space when exporting
20time sudo dd if=/dev/zero of=/tmp/zero bs=1M || true
21sync ; sleep 1 ; sync ; sudo rm -f /tmp/zero
22
23history -c
24rm -f ~/.bash_history
cmof1a04002019-06-14 16:06:12 +080025
26# Delete vagrant user
27sudo userdel -r -f vagrant
28