If you want to clear MS Teams cache,you could refer to the following ways

1.  Fully exit the Microsoft Teams desktop client. To do this, either right click Teams from the Icon Tray and select ‘Quit’, or run Task Manager and fully kill the process.

2.  Go to File Explorer, and type in %appdata%\Microsoft\teams.

3.  Once in the directory, you’ll see a few of the following folders:

  • From ‘Application Cache’, go to Cache and delete any of the files in the Cache location. “%appdata%\Microsoft\teams\application cache\cache”
  • From ‘Blob_storage’, delete any files that are located in here if any. “%appdata%\Microsoft\teams\blob_storage”
  • Within ‘Cache’, delete all files “%appdata%\Microsoft\teams\Cache”
  • Within ‘databases’, delete all files “%appdata%\Microsoft\teams\databases”
  • Within ‘GPUCache’, delete all files “%appdata%\Microsoft\teams\GPUcache”
  • Within ‘IndexedDB’, delete the .db or .ldb file “%appdata%\Microsoft\teams\IndexedDB”
  • Within ‘Local Storage’, delete all files “%appdata%\Microsoft\teams\Local Storage”
  • Lastly, from ‘tmp’, delete any file “%appdata%\Microsoft\teams\tmp” and”%AppData%\Microsoft\Teams\Backgrounds”

For macOS, this would be the magic folder: /Users/user_name/Library/Application Support/Microsoft/Teams. (thanks to Lucian Naie (@lnaie) for the contribution)

  • Batch Version (credits to @jared)
del /F/Q/S “%APPDATA%\Microsoft\Teams\blob_storage\*”
FOR /D %%p IN (“%APPDATA%\Microsoft\Teams\blob_storage\*”) DO rmdir “%%p” /s /q
del /F/Q/S “%APPDATA%\Microsoft\Teams\cache\*”
del /F/Q/S “%APPDATA%\Microsoft\Teams\databases\*”
del /F/Q/S “%APPDATA%\Microsoft\Teams\gpucache\*”
del /F/Q/S “%APPDATA%\Microsoft\Teams\IndexedDB\*”
FOR /D %%p IN (“%APPDATA%\Microsoft\Teams\IndexedDB\*”) DO rmdir “%%p” /s /q
del /F/Q/S “%APPDATA%\Microsoft\Teams\Local Storage\*”
FOR /D %%p IN (“%APPDATA%\Microsoft\Teams\Local Storage\*”) DO rmdir “%%p” /s /q
del /F/Q/S “%APPDATA%\Microsoft\Teams\tmp\*”
del /F/Q/S “%APPDATA%\Microsoft\Teams\backgrounds\*”
  • PowerShell Version (credits to @synikil and @Salim Hurjuk)
Remove-Item –path $env:APPDATA”\Microsoft\teams\application cache\cache\*”
Remove-Item –path $env:APPDATA”\Microsoft\teams\blob_storage\*”
Remove-Item –path $env:APPDATA”\Microsoft\teams\databases\*”
Remove-Item –path $env:APPDATA”\Microsoft\teams\GPUcache\*”
Remove-Item –path $env:APPDATA”\Microsoft\teams\IndexedDB\*” -recurse
Remove-Item –path $env:APPDATA”\Microsoft\teams\Local Storage\*” -recurse
Remove-Item –path $env:APPDATA”\Microsoft\teams\tmp\*”
Remove-Item –path $env:APPDATA”\Microsoft\teams\Cache\*”
Remove-Item –path $env:APPDATA”\Microsoft\teams\backgrounds\*”
  • For CCleaner User (kudos to @Robert Franco)
[Microsoft Teams *]
LangSecRef=3021
Default=True
DetectFile=%LocalAppData%\Microsoft\Teams
FileKey1=%AppData%\Microsoft\Teams\application cache\cache|*|RECURSE
FileKey2=%AppData%\Microsoft\Teams\blob_storage|*|RECURSE
FileKey3=%AppData%\Microsoft\Teams\Cache|*|RECURSE
FileKey4=%AppData%\Microsoft\Teams\databases|*|RECURSE
FileKey5=%AppData%\Microsoft\Teams\GPUcache|*|RECURSE
FileKey6=%AppData%\Microsoft\Teams\IndexedDB|*|RECURSE
FileKey7=%AppData%\Microsoft\Teams\Local Storage|*|RECURSE
FileKey8=%AppData%\Microsoft\Teams\tmp|*|RECURSE
FileKey9=%AppData%\Microsoft\Teams\Service Worker\CacheStorage|*|REMOVESELF
;remove previous version:
FileKey10=%LocalAppData%\Microsoft\Teams\previous\|*.*|REMOVESELF
FileKey15=%AppData%\Microsoft\Teams|old_logs_*.txt

Once finally done clearing, you can now restart Teams from your local desktop and all cache will be cleared from the desktop app.

51 responses to “Microsoft Teams: How to clean cache”

  1. Thankss for this really nice info…….

    Like

  2. For the step:
    Within ‘IndexedDB’, delete the .db file “%appdata%\Microsoft\teams\IndexedDB”

    I could not see any .db files in that area – but instead I saw .ldb files.
    It works if the .ldb files are deleted from this section.

    Perhaps update the posting with this information.

    Like

    1. Thanks for the information, I will update the post

      Liked by 1 person

  3. Is there any negative side to this purge? i.e. loss of conversations, files, posts, etc

    Like

    1. No, as far as I am concerned

      Like

  4. can these steps applied on both Mac and Windows?

    Like

    1. Only Windows, but I hope that for Mac there is also an available method

      Like

  5. I was heavily battling with an error that I could not log in teams from the internet. I was prompted to log in, password, adn then an screen saying somehting went wrong with a missleading code caa2000c wich translates to an issue related to modern authentication.

    I was the only one in my organziation having that issue and this started a week ago.

    When I did follow your steps, they did not clean the cache 100%. I ended up deleting the complete folder %appdata%\Microsoft\Teams.

    I started Teams, toke perhaps 20 more seconds to start for the first time, I enteredmy credentials and all worked perfectly. I guess this folder is the full cache and is safe to delete. I did not had any data loss.

    Like

    1. Glad to hear that you solved the problem 😉

      Like

  6. Very helpful, saved me a lot of trouble! Do you know which directory contains files that are shared in chat? In the future I’d like to preserve the files, but wipe everything else.

    Like

  7. hi can i ask???
    i have a problem and i think have an app issues,
    i cant log in to my ms team account in my computer but my account can log in to others,
    what should i do???
    how many time that i uninstalled and installed the ms app but the problem was not fixed,
    any thought regarding to my problem???
    thanks for help in advance

    Liked by 1 person

    1. The only thing that I can say is that you should check the logs of the app… It’s a weird behaviour

      Like

  8. […] Microsoft Teams: How to clean cache […]

    Like

  9. Top advice, few folders are similarly named on my PC, I just deleted the contents and sub-folders of all of them, as well as all of the files (not folders) in the Teams Folder itself – worked like a charm!

    Liked by 2 people

  10. All users have a lot of files in folder %appdata%\Microsoft\Teams\Service Worker\CacheStorage. Is it also cache? Can I delete them. What is stored in these files?

    Liked by 1 person

    1. internal and temporary files from Teams

      Like

  11. I made some Powershell commands to copy and paste in Powershell after you exit teams. It worked for me.
    ===
    Remove-Item –path $env:APPDATA”\Microsoft\teams\application cache\cache\*”
    Remove-Item –path $env:APPDATA”\Microsoft\teams\blob_storage\*”
    Remove-Item –path $env:APPDATA”\Microsoft\teams\databases\*”
    Remove-Item –path $env:APPDATA”\Microsoft\teams\GPUcache\*”
    Remove-Item –path $env:APPDATA”\Microsoft\teams\IndexedDB\*” -recurse
    Remove-Item –path $env:APPDATA”\Microsoft\teams\Local Storage\*” -recurse
    Remove-Item –path $env:APPDATA”\Microsoft\teams\tmp\*”

    Like

    1. Thanks for posting!!

      Like

    2. I guess you missed Cache directory in script

      Remove-Item –path $env:APPDATA”\Microsoft\teams\Cache\*”

      Liked by 1 person

    3. Aand why not add the largest (half a gig) Service Worker\CacheStorage dir? And make it into a script?

      Liked by 1 person

      1. You can try to type an script and share it with the community 😉

        Like

  12. can someone help me with this weird teams issue
    We have migrate an organisation from Free Teams to Business Teams
    Somehow for few users signing into Desktop Teams is still picking up their Free Teams account. Whereas web version is all good.
    We have re-installed teams multiple times, it is only related to that windows profile.

    Like

    1. I would strongly recommend to clean the credential store on Windows, give it a chance. Delete the information profile on the credential store and I think that the problem would be solved

      Like

  13. Abhijit Savardekar Avatar
    Abhijit Savardekar

    Hi I followed all your steps . But could not find Application Cache folder…rest all deleted…still issue not resolved.Is there any steps i am missing to do properly.
    %appdata%\Microsoft\teams\IndexedDB folder was empty.

    Like

    1. have you tried to show hidden folders?

      Like

  14. Extremely helpful, fixed the issue I was running into with previously created Forms not loading in Teams. Thank you very much!!!

    Like

    1. Glad it helped 🙂

      Like

  15. Esther Edouard Avatar
    Esther Edouard

    Where is the Cache Folder?

    Like

    1. You must follow the steps… All the info is included in the post

      Like

  16. this will work for login issue? because we recently integrated the user login to AD to make. and now some users are unable to login showing “we’ve run into issue”

    Like

    1. I don’t know, give it a try and post back the result 😉

      Like

  17. for macOS, this would be the magic fodler: /Users/user_name/Library/Application Support/Microsoft/Teams.

    Like

    1. Thanks for the point! I will update the post with this info

      Like

    2. I deleted all data from Library/Application Support/Microsoft/Teams folder…but still it is loading all previous
      data

      Like

  18. I am unable to switch between Orgs in Teams. I do not get that option with a drop down to switch orgs near my profile name. Would clearing cache clear out this problem for me ? 😉

    Like

    1. Sorry, but not sure, this was not my case… You can try to empty the cache folder, is not harmful at all

      Like

  19. Here’s a Batch version:
    ————————————-
    del /F/Q/S “%APPDATA%\Microsoft\Teams\blob_storage\*”
    FOR /D %%p IN (“%APPDATA%\Microsoft\Teams\blob_storage\*”) DO rmdir “%%p” /s /q
    del /F/Q/S “%APPDATA%\Microsoft\Teams\cache\*”
    del /F/Q/S “%APPDATA%\Microsoft\Teams\databases\*”
    del /F/Q/S “%APPDATA%\Microsoft\Teams\gpucache\*”
    del /F/Q/S “%APPDATA%\Microsoft\Teams\IndexedDB\*”
    FOR /D %%p IN (“%APPDATA%\Microsoft\Teams\IndexedDB\*”) DO rmdir “%%p” /s /q
    del /F/Q/S “%APPDATA%\Microsoft\Teams\Local Storage\*”
    FOR /D %%p IN (“%APPDATA%\Microsoft\Teams\Local Storage\*”) DO rmdir “%%p” /s /q
    del /F/Q/S “%APPDATA%\Microsoft\Teams\tmp\*”

    Liked by 1 person

  20. thanks a lot, it was so helpful

    Liked by 1 person

  21. Naomi Rogalska Avatar
    Naomi Rogalska

    Hi I deleted files as per Microsoft (hadn’t found your post at the time) but now I have a folder missing and no longer have ‘Backgrounds’ as an option. I’ve tried uninstalling and reinstalling but to no avail. I used to have this option on this device so that shouldn’t be the issue but.. I am using a Microsoft Surface. Any hep would be appreciated! Naomi

    Like

    1. Hi, no idea, never faced that problem… I guess something related with some registry key, but not sure

      Like

    2. %AppData%\Microsoft\Teams\Backgrounds

      Like

  22. Roberto Franco Avatar
    Roberto Franco

    For all CCleaner users, you may add following lines to C:\Program Files\CCleaner\winapp2.ini:

    [Microsoft Teams *]
    LangSecRef=3021
    Default=True
    DetectFile=%LocalAppData%\Microsoft\Teams
    FileKey1=%AppData%\Microsoft\Teams\application cache\cache|*|RECURSE
    FileKey2=%AppData%\Microsoft\Teams\blob_storage|*|RECURSE
    FileKey3=%AppData%\Microsoft\Teams\Cache|*|RECURSE
    FileKey4=%AppData%\Microsoft\Teams\databases|*|RECURSE
    FileKey5=%AppData%\Microsoft\Teams\GPUcache|*|RECURSE
    FileKey6=%AppData%\Microsoft\Teams\IndexedDB|*|RECURSE
    FileKey7=%AppData%\Microsoft\Teams\Local Storage|*|RECURSE
    FileKey8=%AppData%\Microsoft\Teams\tmp|*|RECURSE
    FileKey9=%AppData%\Microsoft\Teams\Service Worker\CacheStorage|*|REMOVESELF
    ;remove previous version:
    FileKey10=%LocalAppData%\Microsoft\Teams\previous\|*.*|REMOVESELF

    Like

  23. Roberto Franco Avatar
    Roberto Franco

    CCleaner users, please add:
    FileKey15=%AppData%\Microsoft\Teams|old_logs_*.txt

    Like

  24. […] and the public teams. Probably you will need to clean cache in the browser and in the Teams App ( https://albandrodsmemory.wordpress.com/2019/01/04/microsoft-teams-how-to-clean-cache […]

    Like

  25. Would be nice to teach the linux version too

    Like

  26. Hi,
    All comments are about deleting the MS Teams (cache) files AFTER using Teams.
    I would like to set a limit per user/account, i.e 200 MB /user, in Teams (or Windows).
    So I can manage the diskresources better.
    We use a virtual cache disk for all (many users) and I would like to know how many TB I will need.
    Is there a setting/GPO in Teams / Office365 / Windows to set a maximum limit ?
    A diskquotum on storage level will not work, because then the system will ‘see’ a full disk and things will stop working..
    Any suggestions ? otherwise we’ve to pray for a solution in MS Teams 2.0

    Like

  27. Thanks for the batchfile & Ps Scripts, it works!

    Like

  28. Thanks great bblog post

    Like

  29. […] solve that problem I tried to clean the cache: Microsoft Teams: How to clean cache – Albandrod’s Memory (wordpress.com) with no luck, and the only working method was to delete the cache from […]

    Like

Leave a reply to albandrod Cancel reply

Trending