How to clear Microsoft Teams Cache

If you ever run into issues with Microsoft Teams, one of the best things you can do to try and remediate the issue is clearing the cache for the application.

Unfortuantely however, Microsoft have not made this easy with teams.

Teams caches data in several folders and remoting on to a users pc to delete the folders can be time consuming lengthy process. However, Using the script below you will be able to clear the cache from all relevant locations.

Just copy paste the code below and run it on the target pc.

Write-Host "Clearing Teams Disk Cache" -ForegroundColor Yellow
try{
Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\application cache\cache" | Remove-Item -Confirm:$false
Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\blob_storage" | Remove-Item -Confirm:$false
Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\databases" | Remove-Item -Confirm:$false
Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\cache" | Remove-Item -Confirm:$false
Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\gpucache" | Remove-Item -Confirm:$false
Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\Indexeddb" | Remove-Item -Confirm:$false
Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\Local Storage" | Remove-Item -Confirm:$false
Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\tmp" | Remove-Item -Confirm:$false
Write-Host "Teams Disk Cache Cleaned" -ForegroundColor Green
}catch{
echo $_
}

I will soon provide a completed script on how to run this code on your target machines remotely.

Thanks for reading.

Leave a Reply

Your email address will not be published.