blob: 21ccda33965d05bcf4f3aa3ef937bb5f73608c24 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/bin/bash
rm -f ~/Library/Application Support/CrashReporter/*
rm -rf ~/Library/Logs/DiagnosticReports/*
rm -rf ~/Library/Logs/*
rm -f ~/.bash_sessions/*
for arg in $@; do
case "$arg" in
"--deep" | '-d')
# probably good idea to have all apps closed and reboot once purged
rm -rf ~/Library/Caches/*
# per user cache files
sudo rm -rf /var/folders/*
sudo rm -rf /var/db/diagnostics/*
;;
esac
done
sudo rm -rf /Library/Logs/*
sudo find /var/log/ -type f -exec rm -f {} \;
exit 0
|