Cleanup your local Sitecore instances
If you’re like me and have a few local installations of Sitecore, these can build up a lot of temporary files over time.
This is just a quick PowerShell script you can run to clean these up. I saved about 50GB over the 10 instances I have installed locally.
Get-ChildItem “C:\inetpub\wwwroot\*\App_Data\mediaIndexing” | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue
Get-ChildItem “C:\inetpub\wwwroot\*\App_Data\MediaCache” | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue
Get-ChildItem “C:\inetpub\wwwroot\*\App_Data\DeviceDetection” | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue
- Media Indexing — These are created by a computed Solr index field.
- Media Cache — Any media library items you hit are stored here as a local cache.
- Device Detection — Sitecore Device Detection cache used for analytics/tracking.