From 8f113b48cc69b7203290dfcfafeb2bde9c45c292 Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Wed, 19 Jun 2013 16:58:00 -0700 Subject: [PATCH] vm_cleanup: add apt-get autoremove, and zero disk blocks --- util/install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/util/install.sh b/util/install.sh index 0c187f4..1908904 100755 --- a/util/install.sh +++ b/util/install.sh @@ -557,6 +557,7 @@ function all { function vm_clean { echo "Cleaning VM..." sudo apt-get clean + sudo apt-get autoremove sudo rm -rf /tmp/* sudo rm -rf openvswitch*.tar.gz @@ -577,6 +578,9 @@ function vm_clean { git config --global user.name "None" git config --global user.email "None" + echo "Zeroing out file blocks for efficient compaction" + time sudo cp /dev/zero /tmp/; sync ; sleep 1 ; sync ; sudo rm -f /tmp/zero + } function usage {