Clearing up ServiceProfile Folder

Sourav2044 65 Reputation points
2024-11-08T10:49:14+00:00

Hello All,

I have a query regarding whether 'ServiceProfiles' folder under C:\Windows directory can be cleaned up or not . This is because this folder is taking up a large amount of space.

Service Profiles

Also if I can get an idea of what this folder is all about and what is its significance? I searched online but did not get satisfactory explanation.

I hope this forum will me out .

Attaching screenshot for reference

Windows for business Windows Server User experience Other
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2024-11-08T14:34:18.7833333+00:00

    Hello,

    Thank you for posting in Q&A forum.

    Based on my understanding of your issue, I suspect that there are a lot of delivery optimization files in this path. I suggest you delete them using the following method:

    1. Press Win + R to open the Run window, type cleanmgr and confirm to open Disk Cleanup.
    2. Select your operating system drive C: and click OK.
    3. Check Delivery Optimization Files. Then, click OK and select Delete Files.

    User's image

    Best regards

    Zunhui

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.


  2. MotoX80 36,291 Reputation points
    2024-11-11T19:31:49.7133333+00:00

    The temp folder is occupying a lot of space

    Run cleanmgr and select "Temporary files". See if that reports 55 gig of space and deletes the files.

    If it doesn't then you will need to manually delete those files.

    You might want to investigate which service is creating those files. Maybe open a small one with notepad and look for words/strings that might tell you what it was used for. (Exchange maybe?) See if you can find any options for deleting temporary files in that program's configuration settings.

    You can use Powershell to delete old .tmp files. Use task scheduler to automate it.

    This will delete files older than 2 weeks. (14 days) The -WhatIf switch tells Powershell to report what it would do but not actually do it. In this case, PS will not delete the files (via remove-item). It will report "What if: Performing the operation "Remove File" on target "C:\Windows......"

    You should thoroughly test this to verify what files it's going to delete before actually deleting them. (By removing the -WhatIf switch.) You may need to adjust the number of days if the files are still being used.

    Do this on a test server first.

    ((gci c:\Windows\ServiceProfiles -Filter Temp -recurse -Directory -ea SilentlyContinue).fullname | foreach {gci $_ -filter *.tmp}) | where-object -property LastWriteTime -lt ((get-date).adddays(-14)) | remove-item -force -whatif 
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.