This commit is contained in:
commit
eea1a2af99
1 changed files with 8 additions and 0 deletions
8
cleanup.sh
Normal file
8
cleanup.sh
Normal file
|
@ -0,0 +1,8 @@
|
|||
#! /bin/sh
|
||||
|
||||
sudo find /var/lib/apt -type f -delete
|
||||
sudo find /var/cache/apt -type f delete
|
||||
sudo find /var/log -type f -regextype posix-extend -regex '.*\.(gz|xz|[0-9])' -delete
|
||||
truncate -s0 $HOME/.bash_history && \
|
||||
sudo find /var/log -type f -exec truncate -s0 '{}' '+' && \
|
||||
sudo bash -c "dd if=/dev/zero of=/emptyfile bs=4M; rm -f /emptyfile; poweroff"
|
Loading…
Reference in a new issue