Jump to content

Recommended Posts

november_ra1n

Reduce the Size & Cleanup WinSXS Folder [Windows 8 & 8.1]

Cleanup Windows upgrade log files
The safest way to delete the “Windows upgrade log files” is through Disk clean-up. Here is how you can do that:
Click on Start button and search Disk Cleanup and and click the “Free up disk space by removing unnecessary files” shortcut that appears.)
o1r.png
You might be prompted to choose a drive, choose the system drive from list and proceed. It will then start scanning your drive for files that can be cleaned up.
On scan completed, you will be presented with Disk Cleanup dialog box, click on Clean up system files and if prompted to choose a drive, choose the system drive used to install or upgrade windows onto and proceed. Disk Clean up utility will scan the system drive again to find the windows upgrade files on the drive selected.
07ry.png
In the Files to delete list scroll down and you will see Windows Upgrade log files check this item from list (your will be more in size if you recently upgraded) and click Ok. A warning message will be shown say the files will be deleted permanently, click Delete Files to clean up selected files from list.
eel5.png
That should give you some extra free space – In safe way.
Using StartComponentCleanup
Where to Find the Task Scheduler in Windows 8 & 8.1
In Windows 8, search is the fastest way to start just about anything. The problem is that you must perform the search using the word schedule. If you type task or some other word, you won't get the appropriate search results. Then, filter the results by Settings and click or tap "Schedule tasks".
84k1.png
To run it, open Task Scheduler and navigate to the following task:
Task Scheduler Library\Microsoft\Windows\Servicing\StartComponentCleanup
In the right pane, under Selected Items, you will see Run. Click on it to start the StartComponentCleanup task.
This will start a process called TiWorker.exe or Windows Modules Installer Worker. You will not see any confirmation dialog box that the process has been started, but you will be able to see it in the Task Manager – and feel a lot of hot air coming out of your laptops vent! By default, in Windows 8, if this tasks runs for more than 1 hour, it will terminate automatically. To end this process, you can click on End. You will in this case, see Windows asking you for confirmation: Do you want to end all instances of this task. Click Yes.

otkb.png

You may run it manually or you may schedule it to run, say every month using the StartComponentCleanup command, to clean up and compress the components.. You may automate the process by setting up a Trigger for the task to run using the Task Scheduler.

b5fe.jpg

Alternatively, you can also run the StartComponentCleanup task using an elevated Command Prompt, using the following command:

Command Prompt (Admin)

schtasks.exe /Run /TN “\Microsoft\Windows\Servicing\StartComponentCleanup”

If you are successful, you will see a SUCCESS message returned.

257g.jpg

WinSxS folder cleanup
In Windows 8 and Windows 8.1 however, things have become easier. Windows 8 will automatically reduce the size of the WinSxS. These methods include internal processes, such as uninstalling and deleting packages with components that have been replaced by other newer components. Previous versions are then kept for a period of time, after which they are automatically removed.
We saw that Windows 8.1 introduced a new command line option for DISM.exe, /AnalyzeComponentStore. Running this command, will analyze the WinSxS folder and tell you whether a Component Store Cleanup is recommended or not.
Analyze Windows Component Store size in Windows 8.1
To find out the actual size of your Windows Component Store in Windows 8.1 and analyze its contents, open a Windows PowerShell (Admin) window or an elevated command prompt, type the following and hit Enter.
PowerShell (Admin)
Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore

82ko.png

Windows 8 and Windows Server 2012 R2 offers a numbers of ways to cleanup of the WinSxS folder which includes the Windows Component Store. It may compress certain files or it may delete some packages. Let us see how you can cleanup WinSxS folder in these latest versions of the Windows operating system. There are 3 ways how you can do it.

Using Deployment Image Servicing and Management

Using DISM you can configure and update Windows features, packages, drivers and so on. The /Cleanup-Image parameter of Dism.exe, will provide you with advanced options to reduce the size of the WinSxS folder, writes TechNet.

A) Using the /StartComponentCleanup parameter of Dism.exe on a running version of Windows 8.1 gives you similar results to running the StartComponentCleanup task in Task Scheduler.
Open an elevated command prompt, type the following and hit Enter:

Command Prompt (Admin)

Dism.exe /online /Cleanup-Image /StartComponentCleanup

dw5t.png

B) If you use the /ResetBase switch with the /StartComponentCleanup parameter, you will be able to remove all superseded versions of every component in the component store.
From the elevated command prompt, type the following and hit Enter:
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase

1yss.png

C) If you want to reduce the amount of space used by a Service Pack, use the /SPSuperseded parameter of Dism.exe on a running version of Windows 8.1 to remove any backup components needed for uninstallation of the service pack.
From the elevated command prompt, type the following and hit Enter:
Dism.exe /online /Cleanup-Image /SPSuperseded
Do note that if you carry out this command, you will not be able uninstall existing service packs and updates.
Remove Features on Demand
Modern versions of Windows allow you to enable or disable Windows features on demand. You’ll find a list of these features in the Windows Features window you can access from the Control Panel.

bs5f.png

Open a Command Prompt window as Administrator. Use the following command to see the features available to you:

Command Prompt (Admin)

DISM.exe /Online /English /Get-Features /Format:Table

You’ll see a table of feature names and their states.

ypl4.png

To remove a feature from your system, you’d use the following command, replacing NAME with the name of the feature you want to remove. You can get the feature name you need from the table above.

Command Prompt (Admin)

DISM.exe /Online /Disable-Feature /featurename:NAME /Remove

tf63.png

If you run the /GetFeatures command again, you’ll now see that the feature has a status of “Disabled with Payload Removed” instead of just “Disabled.” That’s how you know it’s not taking up space on your computer’s hard drive.

november_ra1n 21 Jan 2014

Edited by november_ra1n
Link to comment
Share on other sites


  • Replies 9
  • Views 5.1k
  • Created
  • Last Reply

Top Posters In This Topic

  • november_ra1n

    2

  • FukenGruven

    2

  • jackieo

    1

  • pakura

    1

Top Posters In This Topic

heck yea..

nice tut..

i use BleachBitPortable for cleaning up old Windows Updates.. which M$ does a poor job of cleaning up after it's done.

i usually reclaim approx. 3 - 4GB of space..

With this .. i just reclaimed approx. 1 GB of space :)

Link to comment
Share on other sites


unknownasphyxiated

heck yea..

nice tut..

i use BleachBitPortable for cleaning up old Windows Updates.. which M$ does a poor job of cleaning up after it's done.

i usually reclaim approx. 3 - 4GB of space..

With this .. i just reclaimed approx. 1 GB of space :)

if i'm not mistaken, you will not be able to uninstall any update after you run the cleanup

Link to comment
Share on other sites


november_ra1n

if i'm not mistaken, you will not be able to uninstall any update after you run the cleanup

That is right but why you want to uninstall any Windows Update first place, all updates are for some good reason.!

Edited by november_ra1n
Link to comment
Share on other sites


heck yea..

nice tut..

i use BleachBitPortable for cleaning up old Windows Updates.. which M$ does a poor job of cleaning up after it's done.

i usually reclaim approx. 3 - 4GB of space..

With this .. i just reclaimed approx. 1 GB of space :)

if i'm not mistaken, you will not be able to uninstall any update after you run the cleanup

BleachBit cleans the update files..

you can still uninstall ..

With this.. ensure you've uninstalled all unwanted updates before cleaning.

Here's a batch that will automate each step, asking for confirmation with each phase:

@echo offcolor F0clsDism.exe /Online /Cleanup-Image /AnalyzeComponentStoreecho.set _ok=set /p _ok=Continue with Store Cleanup? (Y/N)if /I NOT "%_ok%" == "Y" EXITDism.exe /online /Cleanup-Image /StartComponentCleanupecho.set _ok=set /p _ok=Clean outdated and or superseded files? (Y/N)if /I NOT "%_ok%" == "Y" EXITDism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBaseecho.set _ok=set /p _ok=Finally, clean Service Pack uninstall files? (Y/N)if /I NOT "%_ok%" == "Y" EXITDism.exe /online /Cleanup-Image /SPSupersededpause
Link to comment
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...