Mastodon Mastodon - Completely delete teams on a Mac
 logo
  • Home 
  • Tags 
  • Blog posts 
  1. Home
  2. Blog posts
  3. Completely delete teams on a Mac

Completely delete teams on a Mac

Posted on August 4, 2021  (Last modified on July 11, 2024) • 1 min read • 146 words
O365   Cli  
O365   Cli  
Share via

If teams is acting up sometimes (read: almost always) the only way to stop it is by deleting it completely. Microsoft has an answer on Microsoft answers on how to do it, I put it into a script. Here it is.

This might not be absolutely everything though, cause it still remembered my account which I used last time.

#!/usr/bin/env bash

# source: microsoft
# https://answers.microsoft.com/en-us/msteams/forum/all/how-to-completely-remove-teams-from-mac/2499239d-d491-43cb-a9c1-acbee7223b8d


# $1 - full path to file / dir to delete
delete_teams_file() {
    DELETE_ME=$1
    if [[ -d $1 ]] ; then
        echo -n "DELETE      $DELETE_ME ... "
        rm -rf "$DELETE_ME"
        echo "done."
    else
        echo "Not found - $DELETE_ME"
    fi
}

set -euo pipefail

# prepare sudo entry
echo "Prepare sudo ..."
sudo echo "sudo prep successful :)"

DELETE_BASE="$HOME/Library/Caches/com.microsoft."
for DELETE_DIR in teams teams.shipit ; do
    delete_teams_file "${DELETE_BASE}${DELETE_DIR}"
done

DELETE_BASE="$HOME/Library/Application Support/Microsoft/Teams"
delete_teams_file "$DELETE_BASE"

sudo rm -rf "/Applications/Microsoft Teams.app"

echo "All done."
 GOPATH and GOROOT
Hugo migration experiences 
In case you want to follow me

Here are some links. The further to the right, the less active.

           
(c) Axel Bock | Powered by Hinode.
Link copied to clipboard
Code copied to clipboard