Cleanup your local Sitecore instances

Mark Gibbons
1 min readMay 19, 2020

--

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.

--

--

Mark Gibbons
Mark Gibbons

Written by Mark Gibbons

Technical Architect @ Aceik | Sitecore Technology MVP 2020 - 2024 with a love for all things #Sitecore / Twitter twitter.com/markgibbons25

No responses yet