bootstrap/cleanup.sh
Tobias Schmidl 51ad5f1768
2018-10-19 10:45:04 +02:00

11 lines
372 B
Bash

#! /bin/sh
find /var/lib/apt -type f -delete
find /var/cache/apt -type f -delete
find /var/log -type f -regextype posix-extended -regex '.*\.(gz|xz|[0-9])' -delete
truncate -s0 $HOME/.bash_history
[ -w $HOME/.zsh_history ] && truncate -s0 HOME/.zsh_history
find /var/log -type f -exec truncate -s0 '{}' '+'
dd if=/dev/zero of=/emptyfile bs=4M;
rm -f /emptyfile;
poweroff