From ff5be5b441fc6bb6053c567bdd834331d6950ea3 Mon Sep 17 00:00:00 2001 From: Jan Date: Tue, 17 Aug 2021 15:53:37 +0200 Subject: [PATCH] added microsoft teams cleanup --- README.md | 1 + mac-cleanup | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/README.md b/README.md index 1fdefd4..d4eaa2a 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ A cleanup script for macOS that runs the following tasks: * Remove Minecraft logs and cache * Remove Steam logs and cache * Remove Lunar Client logs and cache +* Remove Microsoft Teams logs and cache * Remove Wget logs and hosts * Clear Bash/ZSH history * Removes Cacher logs diff --git a/mac-cleanup b/mac-cleanup index 5411cc4..80da373 100755 --- a/mac-cleanup +++ b/mac-cleanup @@ -316,6 +316,24 @@ if type "pod" &>/dev/null; then pod cache clean --all &>/dev/null fi +# Deletes all Microsoft Teams Caches and resets it to default - can fix also some performance issues +# -Astro +if [ -d ~/Library/Application\ Support/Microsoft/Teams ]; then + # msg 'Deleting Microsoft Teams logs and caches...' + rm -rfv ~/Library/Application\ Support/Microsoft/Teams/IndexedDB &>/dev/null + rm -rfv ~/Library/Application\ Support/Microsoft/Teams/Cache &>/dev/null + rm -rfv ~/Library/Application\ Support/Microsoft/Teams/Application\ Cache &>/dev/null + rm -rfv ~/Library/Application\ Support/Microsoft/Teams/Code\ Cache &>/dev/null + rm -rfv ~/Library/Application\ Support/Microsoft/Teams/blob_storage &>/dev/null + rm -rfv ~/Library/Application\ Support/Microsoft/Teams/databases &>/dev/null + rm -rfv ~/Library/Application\ Support/Microsoft/Teams/gpucache &>/dev/null + rm -rfv ~/Library/Application\ Support/Microsoft/Teams/Local\ Storage &>/dev/null + rm -rfv ~/Library/Application\ Support/Microsoft/Teams/tmp &>/dev/null + rm -rfv ~/Library/Application\ Support/Microsoft/Teams/*logs*.txt &>/dev/null + rm -rfv ~/Library/Application\ Support/Microsoft/Teams/watchdog &>/dev/null + rm -rfv ~/Library/Application\ Support/Microsoft/Teams/*watchdog*.json &>/dev/null +fi + msg 'Cleaning up DNS cache...' sudo dscacheutil -flushcache &>/dev/null sudo killall -HUP mDNSResponder &>/dev/null