Tag: Disk Cleanup

  • How to Safely Clean WinSxS on Windows to Reclaim SSD Space

    How to Safely Clean WinSxS on Windows to Reclaim SSD Space

    Windows’ WinSxS folder often looks enormous in File Explorer — sometimes 10–20+ GB — and that can make anyone panic when they’re low on SSD space. Before you reach for the delete key, know this: the folder contains essential Windows components and uses hard links, so the size File Explorer reports is misleading. This post explains what WinSxS actually stores, how to check the real disk usage, and safe, built-in ways to trim it without breaking Windows.

    WinSxS Folder properties

    You’ll learn three safe cleanup options (Disk Cleanup, DISM /StartComponentCleanup, and DISM /ResetBase), how to analyze the component store size, and a couple of quick tips to automate or trigger maintenance. Follow these steps and you can reclaim space without risking system stability.

    What WinSxS is — and why it looks so big

    WinSxS (Windows Side-by-Side) stores system components, old versions of DLLs and files needed for updates, rollbacks, and compatibility. Windows uses hard links to reference many files from multiple locations without duplicating the data. File Explorer counts hard-linked files multiple times, so the folder size it shows is usually much larger than the actual disk space used.

    How to check the real size of the component store

    1. Open PowerShell as Administrator and run: Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore

    2. Wait for the output and look for Actual Size of Component Store.

    3. That number is the real disk usage. Typical healthy systems show ~5–10 GB. If it’s significantly larger, cleanup is reasonable.

    Windows Side by Side real size

    Use Disk Cleanup Tool to Clean WinSxS Folder (Safest and recommended for most users)

    Disk Cleanup uses Windows’ built-in logic to remove only files that are no longer needed.

    1. Press Windows key, type Disk Cleanup, and open it.

    2. Select your system drive (C:) and click OK.

    3. Click Clean up system files and select C: again.

    4. After the scan, check Windows Update Cleanup and Previous Windows installations (if present).

    5. Click OK and confirm deletion.

    Disk Cleanup is conservative and safe for general maintenance; it’s ideal if you just want a reliable way to reclaim a few GB.

    ALSO READ: Create Disk Cleanup Desktop Shortcut for Specific Drive on Windows 11

    Deeper Cleaning with DISM

    For more control and a more thorough cleanup, use DISM in an elevated Terminal.

    1. Safe deeper cleanup (keeps rollback options): Dism.exe /Online /Cleanup-Image /StartComponentCleanup

    2. Aggressive cleanup (removes all superseded component versions permanently — you lose the ability to roll back updates):
    Dism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase

    The /ResetBase option reclaims more space but is irreversible. Both commands can take several minutes to complete.

    Use Task Scheduler to clean the WinSxS Folder

    Windows runs a conservative cleanup automatically during idle time via Task Scheduler.

    1. To run it manually, open Task Scheduler.

    2. Navigate to Task Scheduler Library > Microsoft > Windows > Servicing.

    3. Right-click StartComponentCleanup and choose Run.

    Use Task Scheduler to clean  WinSxS Folder

    This is a middle ground between Disk Cleanup and running DISM yourself.

    Quick tips and final notes

    • Don’t delete files manually from C:\Windows\WinSxS — doing so can corrupt Windows and make it unbootable.
    • Check component store size only every few months; the folder will always take several GB.
    • If you still need more space after cleaning WinSxS, audit installed programs, move large user files to another drive, or use storage sense to offload temporary files.

    Summary

    1. Use AnalyzeComponentStore to see the actual size.
    2. Run Disk Cleanup (Clean up system files) for the safest result.
    3. Use DISM /StartComponentCleanup for deeper cleaning and /ResetBase only if you accept irreversible removal of rollback files.

    Follow these steps and you’ll safely reclaim SSD space without risking system stability.

  • How to Use Command Prompt to Clean Your Windows 11 PC

    How to Use Command Prompt to Clean Your Windows 11 PC

    If you enjoy using the Command Prompt to maintain your Windows 11 PC, you can easily execute commands to clean your system. This allows you to remove junk files, temporary files, prefetch files, and even defragment your hard drive. Windows 11 includes a built-in disk cleanup tool designed to clear system junk, temporary files, and other unnecessary items that consume resources and take up storage space. While accessing these tools is straightforward, Command Prompt enthusiasts may prefer to utilize these hidden features through CMD for a more streamlined experience.

    Use CMD to clean Windows PC

    Utilizing Command Prompt for maintenance tasks is perfect for users who prefer a command-line interface for a cleaner, faster Windows 11 experience. Here is how to do it.

    How to Use Command Prompt to Run Disk Cleanup Utility

    1. First, open the Command Prompt as administrator.

    Open CMD as administrator

    2. Next type the command cleanmgr and press Enter button.

    Disk cleanup via CMD

    3. This will launch the Disk Cleanup utility. Select the drive you want to clean and click the Ok button.

    4. If you wish to skip the drive selection pop-up, execute the command: cleanmgr /sageset

    Command to clean junk files

    [You need to select the files to delete after executing the above command]

    5. If you wish to delete files automatically, then execute the command: cleanmgr /sagerun

    6. The above command will automatically scan your drives and delete junk files from your PC.

    ALSO READ: Create Disk Cleanup Desktop Shortcut for Specific Drive on Windows 11

    How to Clear Temporary Files Using the Command Prompt?

    1. Open Command Prompt as administrator.

    2. Execute the given command: %SystemRoot%\explorer.exe %temp%\

    Command to clean temporary files in Windows 11

    3. You can use the CTRL + A function to select all files. Once selected, you can delete it.

    4. Or execute the command del %temp%*.* /s /q to delete all temporary files.

    How to Delete the Prefetch Files Using the Command Prompt

    1. Open Command Prompt as administrator.

    2. Execute the command %SystemRoot%\explorer.exe C:\Windows\prefetch\

    Command to clean prefetch files in Windows 11

    3. Once done, execute this command to delete the Prefetch files: del C:\Windows\prefetch*.*/s/q

    ALSO READ: How to Safely Clean WinSxS on Windows to Reclaim SSD Space

    How to Defrag the Hard Disk via Command Prompt

    Important: Do not defrag SSD. Execute the command if your PC has HDD. For SSDs, TRIM is a command that tells the drive which data blocks are no longer in use, allowing it to erase them proactively. This advance erasing makes future writes faster and helps extend the SSD’s lifespan. Windows 11 automatically runs TRIM on SSDs by default, typically once a week, so you don’t need to manually optimize your drives using the Optimize Drives utility.

    1. Open Command Prompt as administrator.

    2. Type the command defrag c: and press Enter. [Change the drive letter if you want to defrag any other drive.]

    3. The Disk Defragment tool will scan the selected drive and defrag the drive.

    Conclusion:

    In summary, cleaning your Windows 11 PC via Command Prompt is an efficient way to remove junk files, temporary files, and prefetch data. By executing specific commands, you can optimize system performance and free up storage space. This method is ideal for users who prefer a command-line interface for maintenance tasks.

  • Create Disk Cleanup Desktop Shortcut for Specific Drive on Windows 11

    Create Disk Cleanup Desktop Shortcut for Specific Drive on Windows 11

    Windows 11 has a Disk Cleanup utility, but accessing it is a big task, as its location is within multiple settings. Often you need to navigate through several clicks or use the Windows Search feature to find the built-in cleanup tool. However, you can create a desktop shortcut for it to run Disk Cleanup directly for a specific drive on your computer.

    Create Disk Cleanup Desktop Shortcut

    FYI, Windows 11 has Storage Sense feature that automatically deletes unnecessary files at fixed intervals. While this helps keep your system tidy, it doesn’t replace the need for the built-in Disk Cleanup utility. To effectively remove unwanted files from specific drives, you still need to utilize Disk Cleanup.

    How to Create Desktop Shortcut for Disk Cleanup Utility on Windows 11

    1. Right-click on your desktop, select “New,” and then click on “Shortcut.”

    Create Disk Cleanup Desktop Shortcut

    2. In the location field, type cleanmgr.exe /d C: (choose a different drive letter if your target drive is not C).

    3. Click “Next” and give the shortcut a name (for example, “Disk Cleanup C Drive”).

    Create Disk Cleanup Desktop Shortcut

    4. Finally, click “Finish,” and an icon will appear with the name you chose.

    5. Click the new shortcut to open Disk Cleanup.

    Note: If you prefer not to create a shortcut, you can access the Disk Cleanup tool in Windows 11 by navigating to Settings > System > Storage > Temporary files.

    ALSO READ: How to Safely Clean WinSxS on Windows to Reclaim SSD Space

    You can use the Windows Disk Cleanup tool to remove temporary system files, temporary internet files, delivery optimization files, residual Windows update files, thumbnails, driver packages, Recycle Bin files, Microsoft Defender antivirus files, and more with just a click. This means you don’t need a third-party cleanup tool to keep your system fast and secure.

    Conclusion:

    By regularly cleaning up temporary files, also enabling Storage Sense feature, you can enhance your computer’s speed and maintain its overall health without the need for third-party software. By combining both features, you can ensure your Windows 11system remains optimized and free of clutter, enhancing overall performance.