The Device Detection database files in the /App_Data/DeviceDetection folder are never deleted when the updates happen. Sitecore XP downloads an updated database periodically. When the new database is downloaded, the old ones are supposed to be deleted. Currently, obsolete databases remain stored in the file system, which causes unnecessary disk space usage.
As a workaround for the issue:
<agent type="Sitecore.Tasks.CleanupAgent"> <files> <remove folder="$(dataFolder)/diagnostics/configuration_history" pattern="*" maxAge="30.00:00:00" recursive="false" /> <remove folder="$(dataFolder)/diagnostics/health_monitor" pattern="*.*" maxAge="07.00:00:00" recursive="false" /> <remove folder="$(dataFolder)/DeviceDetection" pattern="*.*" maxAge="07.00:00:00" recursive="false" /> </files> </agent>Note: Choose the appropriate value of maxAge that is suitable for your solution.
In case Device Detection is not used:
Remove databases and disable Device Detection in order to prevent Sitecore XP from downloading the database again:
In the Sitecore.CES.DeviceDetection.config file, set the value of the DeviceDetection.Enabled setting to false:
<setting name="DeviceDetection.Enabled" value="false" />