Forum Discussion
Deleting files in software distribution folder
Hi all,
Is there a way to delete the files within Software distribution folder on devices via intune?
- NielsScheffersIron ContributorNot sure, but I think Storage Sense, which I mentioned in reply to your other thread (https://techcommunity.microsoft.com/t5/microsoft-intune/free-up-space-by-deleting-temp-files-via-intune/td-p/3571927), also cleans up SoftwareDistribution.
- AB21805Bronze ContributorWhen I deployed this storage sense catalogue this didnt delete software distribution so I had to use a .bat file wrapped as a win32 app. Is there any other locations which usually take up space that I could delete?
- Jannik_ReinhardIron Contributor
AB21805 : It is hard to make here a general proposal what you should delete on your systems.
Free up drive space in Windows (microsoft.com)
You can look on a PC what took much storage and what you want to delete in dependence of the size and the use. If you want to use a remediation script instead of a Win32 app, I will be happy to support you in creating it. The advantage here is that you have a reporting through a detection script to e.g. delete only on the devices where the storage usage is >90% and you also see on which devices then the remediation was triggered(Tutorial - Proactive remediations - Microsoft Endpoint Manager | Microsoft Docs).
Here are also some tips to free up disk space but in the end you must decide what you want to delete: 12 best ways to free up hard drive space on Windows 10 | Windows Central.
- Jannik_ReinhardIron Contributor
AB21805 You can do this via a Powershell oder Endpoint analytics remediation script.
If you need support by writing this script let me know.
- leebowman55Copper Contributorfirstly - why?
This is a folder internally managed by the Windows Update service - yes there are lots of troubleshooting suggestions to "fix" an issue, and these work.
However this is not a generic "Delete files" action and I think you should progress with caution and understand the root cause to your question