Home » Blog » How to Clear the Microsoft Teams Cache

How to Clear the Microsoft Teams Cache

How to clear the Microsoft Teams cache

For some issues, it can be helpful to clear the MS Teams cache. For example, it is useful to empty the Microsoft Teams cache when applications or chat issues occur in the native Teams app that cannot be reproduced in the Teams browser app – an indication that the cause may be in the native app cache.

A common error that can often be fixed by clearing the cache in Microsoft Teams: when a static tab does not display any content, but loads an empty page.

Sporadically, problems with Teams’ telephony feature can also be solved by deleting the Microsoft Teams cache.

Unfortunately, Microsoft has not yet implemented a user-friendly way to clear the cache by the click of a button.

Download free ebook on Microsoft Teams governance!

Delete content manually from subfolders

One way to empty the Teams cache is to go to the [user]\%appdata%\Microsoft\teams folder in Windows Explorer and delete the contents in eight of the subfolders. (You need to quit Teams before doing this.) These are the subfolders you need to empty:

  • cache
  • code cache
  • blob_storage
  • databases
  • GPUcache
  • IndexedDB
  • local storage
  • tmp
Alternative management tool for Microsoft Teams

Delete Teams cache with a PowerShell script

Another easier method is to use a PowerShell script instead of navigating to all the cache folders individually and deleting the contents there.

Simply open the PowerShell app (installed by default in current Windows versions), copy and paste the following PowerShell script, press Enter and then restart your computer.

(The script will automatically quit and re-start Microsoft Teams for you).

Write-Host "Microsoft Teams will be quit now in order to clear the cache."
try{
Get-Process -ProcessName Teams | Stop-Process -Force
Start-Sleep -Seconds 5
Write-Host "Microsoft Teams has been successfully quit."
}
catch{
echo $_
}
# The cache is now being cleared.
try{
Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\code cache\cache" | Remove-Item
Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\blob_storage" | Remove-Item
Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\databases" | Remove-Item
Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\cache" | Remove-Item
Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\gpucache" | Remove-Item
Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\Indexeddb" | Remove-Item
Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\Local Storage" | Remove-Item
Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\tmp" | Remove-Item
 
}
catch{
echo $_
}
 
write-host "The Microsoft Teams cache has been successfully cleared."

For more options to keep control of Microsoft Teams, have a look at our Teams Manager app – your powerful governance tool for Microsoft Teams management with a request and approval process for new teams, lifecycle management, naming convention, governance policies and more.

Linkedin Logo

Learn more about Microsoft Teams: Click here to follow us on Linkedin!

Comments
  • This only seems to delete the cache for the user that is activating the script, so, if you run this as an admin on another computer, you will just delete your admins-cache but not from the user..

    • Hello,
      you are right. The script presented here is to delete the client from the computer on which the user is working.
      Regards, Solutions2Share

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Copyright 2021 © Solutions2Share GmbH

Terms and conditions Privacy policy Cookie Policy Imprint

Send this to a friend