bootstrap/cleanup.sh
Tobias Schmidl abd7be2634
2018-06-11 08:44:52 +02:00

10 lines
312 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
find /var/log -type f -exec truncate -s0 '{}' '+'
dd if=/dev/zero of=/emptyfile bs=4M;
rm -f /emptyfile;
poweroff