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\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.
Thankss for this really nice info…….
LikeLike
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.
LikeLike
Thanks for the information, I will update the post
LikeLiked by 1 person
Is there any negative side to this purge? i.e. loss of conversations, files, posts, etc
LikeLike
No, as far as I am concerned
LikeLike
can these steps applied on both Mac and Windows?
LikeLike
Only Windows, but I hope that for Mac there is also an available method
LikeLike
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.
LikeLike
Glad to hear that you solved the problem 😉
LikeLike
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.
LikeLike
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
LikeLiked by 1 person
The only thing that I can say is that you should check the logs of the app… It’s a weird behaviour
LikeLike
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!
LikeLiked by 2 people
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?
LikeLiked by 1 person
internal and temporary files from Teams
LikeLike
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\*”
LikeLike
Thanks for posting!!
LikeLike
I guess you missed Cache directory in script
Remove-Item –path $env:APPDATA”\Microsoft\teams\Cache\*”
LikeLiked by 1 person
Thanks Salim!
LikeLike
Aand why not add the largest (half a gig) Service Worker\CacheStorage dir? And make it into a script?
LikeLiked by 1 person
You can try to type an script and share it with the community 😉
LikeLike
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.
LikeLike
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
LikeLike
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.
LikeLike
have you tried to show hidden folders?
LikeLike
Extremely helpful, fixed the issue I was running into with previously created Forms not loading in Teams. Thank you very much!!!
LikeLike
Glad it helped 🙂
LikeLike
Where is the Cache Folder?
LikeLike
You must follow the steps… All the info is included in the post
LikeLike
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”
LikeLike
I don’t know, give it a try and post back the result 😉
LikeLike
for macOS, this would be the magic fodler: /Users/user_name/Library/Application Support/Microsoft/Teams.
LikeLike
Thanks for the point! I will update the post with this info
LikeLike
I deleted all data from Library/Application Support/Microsoft/Teams folder…but still it is loading all previous
data
LikeLike
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 ? 😉
LikeLike
Sorry, but not sure, this was not my case… You can try to empty the cache folder, is not harmful at all
LikeLike
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\*”
LikeLiked by 1 person
thanks a lot, it was so helpful
LikeLiked by 1 person
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
LikeLike
Hi, no idea, never faced that problem… I guess something related with some registry key, but not sure
LikeLike
%AppData%\Microsoft\Teams\Backgrounds
LikeLike
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
LikeLike
CCleaner users, please add:
FileKey15=%AppData%\Microsoft\Teams|old_logs_*.txt
LikeLike
Would be nice to teach the linux version too
LikeLike
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
LikeLike
Thanks for the batchfile & Ps Scripts, it works!
LikeLike
Glad to read that
LikeLike
Thanks great bblog post
LikeLike