Skip to content

Instantly share code, notes, and snippets.

@mark05e
Last active November 2, 2023 02:44
Show Gist options
  • Save mark05e/855cdee4b72133c97725ef277d6ec40e to your computer and use it in GitHub Desktop.
Save mark05e/855cdee4b72133c97725ef277d6ec40e to your computer and use it in GitHub Desktop.
$rootPath = "C:\Users"
#Chrome
Get-ChildItem -Path "$rootPath\*\AppData\Local\Google\Chrome\User Data\Default\Service Worker\CacheStorage" -force | get-childitem | Remove-Item -Recurse
Get-ChildItem -Path "$rootPath\*\AppData\Local\Google\Chrome\User Data\Default\Cache" -force | get-childitem | Remove-Item -Recurse
Get-ChildItem -Path "$rootPath\*\AppData\Local\Google\Chrome\User Data\Default\Code Cache" -force | get-childitem | Remove-Item -Recurse
#Edge
Get-ChildItem -Path "$rootPath\*\AppData\Local\Microsoft\Edge\User Data\Default\Service Worker\CacheStorage" -force | get-childitem | Remove-Item -Recurse
Get-ChildItem -Path "$rootPath\*\AppData\Local\Microsoft\Edge\User Data\Default\Cache" -force | get-childitem | Remove-Item -Recurse
Get-ChildItem -Path "$rootPath\*\AppData\Local\Microsoft\Edge\User Data\Default\Code Cache" -force | get-childitem | Remove-Item -Recurse
#Teams
Get-ChildItem -Path "$rootPath\*\AppData\Local\Microsoft\Teams\previous" -force | get-childitem | Remove-Item -Recurse
Get-ChildItem -Path "$rootPath\*\AppData\Roaming\Microsoft\Teams\Service Worker\CacheStorage" -force | get-childitem | Remove-Item -Recurse
Get-ChildItem -Path "$rootPath\*\AppData\Roaming\Microsoft\Teams\Cache" -force | get-childitem | Remove-Item -Recurse
Get-ChildItem -Path "$rootPath\*\AppData\Roaming\Microsoft\Teams\Code Cache" -force | get-childitem | Remove-Item -Recurse
Get-ChildItem -Path "$rootPath\*\AppData\Roaming\Microsoft\Teams\IndexedDB" -force | get-childitem | Remove-Item -Recurse
#GoToMeeting
Get-ChildItem -Path "$rootPath\*\AppData\Local\GoToMeeting" -force | get-childitem | Remove-Item -Recurse
#Windows Apps Cache (IE, Word etc)
Get-ChildItem -Path "$rootPath\*\AppData\Local\Microsoft\Windows\INetCache\" -force | get-childitem | Remove-Item -Recurse
#Google Earth
Get-ChildItem -Path "$rootPath\*\AppData\LocalLow\Google\GoogleEarth\Cache\unified_cache_leveldb_leveldb2" -force | get-childitem | Remove-Item -Recurse
#Windows Explorer thumb cache
Get-ChildItem -Path "$rootPath\*\AppData\Local\Microsoft\Windows\Explorer\" | get-childitem -filter "*.db" | Remove-Item -Recurse
#User Recycle Bin
Get-ChildItem -Path "$rootPath\*\Desktop\`$RECYCLE.BIN" -force | get-childitem | Remove-Item -Recurse
Get-ChildItem -Path "$rootPath\*\Downloads\`$RECYCLE.BIN" -force | get-childitem | Remove-Item -Recurse
Get-ChildItem -Path "$rootPath\*\My Documents\`$RECYCLE.BIN" -force | get-childitem | Remove-Item -Recurse
Get-ChildItem -Path "$rootPath\*\AppData\Roaming\`$RECYCLE.BIN" -force | get-childitem | Remove-Item -Recurse
#Toshiba Drivers
Get-ChildItem -Path "C:\Windows\System32\config\systemprofile\TOSHIBA\eSTUDIOX\UNIDRV\Cache" -force | get-childitem | Remove-Item -Recurse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment