diff --git a/.local/bin/scripts/clean b/.local/bin/scripts/clean index bc8e4ca..24f6290 100755 --- a/.local/bin/scripts/clean +++ b/.local/bin/scripts/clean @@ -31,8 +31,8 @@ done highlight "s :: recursively remove logs" [[ $1 =~ "s" ]] && find \( -name ".git" -o -name "src" -o -name "pkg" \) -prune -o \ - \( \( -name "logs" -o -name "log" -o -name "crash-reports" \) -prune -o \ - -type f \( -name "*.log.gz" -o -name "*.log.[0-9]" -o -iname "*.log" \) \) \ + \( \( -name "logs" -o -name "log" -o -name "crash-reports" -o -name ".auctex-auto" \) -prune -o \ + -type f \( -name "*.log.gz" -o -name "*.log.[0-9]" -o -iname "*.log" -o -name "*.tuc" \) \) \ -print -exec rm -rI {} + highlight "m :: recursively remove mac-files" @@ -66,7 +66,9 @@ highlight "c :: clean electron caches" if test -f "/var/log/apt/history.log"; then aptclean_cur=$(cat "/var/log/apt/history.log" | wc -l) - test "$aptclean_cur" -gt "${aptclean_last:--1}" && aptclean && echo "Cleaned apt" + test "$aptclean_cur" -gt "${aptclean_last:--1}" && + sudo apt-get clean && sudo apt-get autoremove && + echo "Cleaned apt" export aptclean_last=$aptclean_cur fi