Clear / empty Microsoft Team Cache
This post is also available in: Español (Spanish) Deutsch (German)
In times of the home office, Microsoft teams are increasingly coming to the fore. Like many Microsoft software products, teams have a cache that can be cleared. You can empty the team cache in Windows Explorer, with PowerShell or also via CMD.
Where is the Team Cache located on Windows?
For faster loading of the application and for swap files, teams from Microsoft have a cache. This consists of several folders and can be found under the following path: %appdata%\Microsoft\teams
This cache folder of teams contains the following folders, the contents of which must be deleted to empty them:
- \application cache\cache\
- \blob_storage\
- \databases\
- \GPUcache\
- \IndexedDB\
- \Local Storage\
- \tmp\
- \Cache\
Delete / Empty Team Cache
Teams has many functions and many factors influence this software. Therefore it can happen that changes to the User UPN are not directly applied, or other settings are not directly applied. The team cache may be to blame here. This can be remedied by deleting or emptying this cache. This can be done in Windows Explorer, via PowerShell or also via CMD.
Windows Explorer
Deleting the Team Cache is possible by hand without any problems. Here the contents of the above mentioned folders must be deleted in Windows Explorer. It is also important that the software is completely closed, otherwise the files to be deleted will be in use.
Delete Team Cache in Windows Explorer
- Ending teams
Teams must be terminated before. In this case, it is not enough to close the window, but must be closed by right-clicking in the taskbar.
- Navigate to Cache
Open Windows Explorer and navigate to or copy the following path:
%appdata%\Microsoft\teams
- Empty Cache
Delete the contents (not the entire folder) of the following Windows folders:
\application cache\cache\
\blob_storage\
\databases\
\GPUcache\
\IndexedDB\
\Local Storage\
\tmp\
\Cache\ - Teams start
After the contents of the folders have been deleted, teams can be started again.
PowerShell
The whole procedure can also be automated using Windows PowerShell to clear the team cache on Windows. For this purpose we provide you with a small script, which not only empties the cache, but also automatically terminates Microsoft teams.
Write Host "Teams will be terminated to clear cache." try{ Get-Process -ProcessName Teams | Stop-Process -Force Start-Sleep -Seconds 5 Write host "Microsoft Teams has been terminated." } catch{ echo $_ } # The cache will now be cleared / emptied try{ Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\application 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 cache has been successfully deleted/empty."
CMD or Batch
Of course, the emptying of the temp directory can also be done by teams via CMD, or a batch file can be created. To delete the cache, the software must first be closed. In this case, it is not enough to close the window, but must be closed via the task bar with a right click. Afterwards the following CMD commands can be executed:
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\*"