bootstrap/cleanup.sh

12 lines
400 B
Bash
Raw Normal View History

2018-06-11 04:25:29 +02:00
#! /bin/sh
2018-06-11 08:44:52 +02:00
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
2019-02-19 06:19:09 +01:00
[ -w $HOME/.zsh_history ] && truncate -s0 $HOME/.zsh_history
2018-06-11 08:44:52 +02:00
find /var/log -type f -exec truncate -s0 '{}' '+'
2019-02-22 08:55:39 +01:00
dd if=/dev/zero of=/emptyfile oflag=sync status=progress bs=4M;
2018-06-11 08:44:52 +02:00
rm -f /emptyfile;
poweroff