Update cleanup.sh
This commit is contained in:
parent
14cbb88cdc
commit
9e07df5b22
@ -17,8 +17,7 @@ rm -rf /var/lib/apt/lists
|
|||||||
# Delete some documentation
|
# Delete some documentation
|
||||||
find /usr/share/doc -depth -type f ! -name copyright|xargs rm -rf
|
find /usr/share/doc -depth -type f ! -name copyright|xargs rm -rf
|
||||||
find /usr/share/doc -empty|xargs rmdir || true
|
find /usr/share/doc -empty|xargs rmdir || true
|
||||||
rm -rf /usr/share/man/* /usr/share/groff/* /usr/share/info/*
|
rm -rf /usr/share/man/* /usr/share/groff/* /usr/share/info/* /usr/share/lintian/* /usr/share/linda/* /var/cache/man/*
|
||||||
rm -rf /usr/share/lintian/* /usr/share/linda/* /var/cache/man/*
|
|
||||||
find /usr/share/doc | egrep "\.gz" | xargs rm -rf
|
find /usr/share/doc | egrep "\.gz" | xargs rm -rf
|
||||||
find /usr/share/doc | egrep "\.pdf$" | xargs rm -rf
|
find /usr/share/doc | egrep "\.pdf$" | xargs rm -rf
|
||||||
find /usr/share/doc | egrep "\.tex$" | xargs rm -rf
|
find /usr/share/doc | egrep "\.tex$" | xargs rm -rf
|
||||||
@ -27,6 +26,9 @@ find /usr/share/doc | egrep "\copyright" | xargs rm -rf
|
|||||||
find /usr/share/locale -mindepth 1 -maxdepth 1 ! -name 'en' |xargs rm -rf
|
find /usr/share/locale -mindepth 1 -maxdepth 1 ! -name 'en' |xargs rm -rf
|
||||||
# Delete old log files
|
# Delete old log files
|
||||||
logrotate -f /etc/logrotate.conf
|
logrotate -f /etc/logrotate.conf
|
||||||
#find /var/log -type f -regex '.*/[^/]*.gz$' -delete && find /var/log -type f -regex '.*/[^/]*.[0-9]$' -delete
|
find /var/log -type f -regex '.*/[^/]*.gz$' -delete && find /var/log -type f -regex '.*/[^/]*.[0-9]$' -delete
|
||||||
|
# Purge root and current user history
|
||||||
|
cat /dev/null > /root/.bash_history
|
||||||
|
cat /dev/null > ~/.bash_history
|
||||||
exit 0
|
exit 0
|
||||||
# EOF
|
# EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user