Cleaning up disk space in virtual desktops

If you want to keep your virtual desktop infrastructure lean, here are some steps to clean up unnecessary disk usage in Windows guest VMs.

  1. Delete all content from the following directories:
    • C:\temp
    • C:\Windows\temp
    • C:\Windows\Software Distribution\Download
    • C:\ProgramData\Teradici\PCoIPAgent\Logs
    • C:\$Recycle.Bin
      • Note that you’ll need to unhide Windows system files in File Explorer to see the Recycle Bins
    • C:\ProgramData\Microsoft\Windows\WER\Temp
    • C:\ProgramData\Microsoft\Windows\WER\ReportArchive
    • C:\ProgramData\Microsoft\Windows\WER\ReportQueue
    • C:\Program Files\Microsoft Office\Updates\Download
    • C:\Windows\Servicing\LCU

  2. Check for and delete any old user profiles under C:\Users

  3. Clean out the following folders of each remaining user’s profile:
    • C:\Users\[USER PROFILE]\Downloads
    • C:\Users\[USER PROFILE]\AppData\Local\Temp
    • C:\Users\[USER PROFILE]\AppData\Local\Microsoft\Teams\Previous
    • C:\Users\[USER PROFILE]\AppData\Local\Microsoft\Windows\INetCache
    • C:\Users\[USER PROFILE]\AppData\Roaming\Microsoft\Teams\Service Worker\CacheStorage

  4. Run Disk Cleanup (Start > type in ‘Disk Cleanup’ > Run as Administrator)
    • Note: you’ll want to run Disk Cleanup in an elevated session to ensure system files will be included

  5. Open Command Prompt as a local admin and run the command:
    DISM /ONLINE /CLEANUP-IMAGE /STARTCOMPONENTCLEANUP

  6. Search the local drive for *.dmp and delete any dump files

  7. Use a program like SpaceSniffer to identify other locations that are taking up a significant amount of space

Leave a Reply

Discover more from vNinja

Subscribe now to keep reading and get access to the full archive.

Continue reading