Deleting Microsoft Teams Cache Data

by Sep 1, 2020

If you use Microsoft Teams for video conferencing, you may occasionally want to clean cache files and remove traces which reside in a number of subfolders.

You can adjust the code from our previous example to do the cleanup for you:

# the folder that contains the Microsoft Teams data
$parentFolder = "$env:userprofile\AppData\Roaming\Microsoft\Teams\*"
# list of subfolders that cache data
$list = 'application cache','blob storage','databases','GPUcache','IndexedDB','Local Storage','tmp'

# delete the folders found in the list
Get-ChildItem $parentFolder -Directory | 
  Where-Object name -in $list | 
  Remove-Item -Recurse -Verbose

If you have Administrator privileges and would like to remove cached Microsoft Teams data for all users, change $parentFolder like this:

$parentFolder = "c:\users\*\AppData\Roaming\Microsoft\Teams\*"


Twitter This Tip! ReTweet this Tip!