Deleting files in software distribution folder

Steel Contributor

Hi all,

 

Is there a way to delete the files within Software distribution folder on devices via intune? 

 

 

9 Replies

@AB21805 You can do this via a Powershell oder Endpoint analytics remediation script.

If you need support by writing this script let me know.

Not 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-int...), also cleans up SoftwareDistribution.
When 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?

@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)

Jannik_Reinhard_1-1657810576770.png

 

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_Reinhard hi could you create me a script for deleting app data files like temp which can be deleted without issues for all users not just one. 

I will ask so check all the links you provided for further assistance thank you so much! 

Yes I will do
Thank you appreciate it!
firstly - 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