How can I remove the contents of the '/winsxs' folder from an old, nonsystem drive?

6

I've found plenty of posts talking about whether you can or cannot or should or should not delete or modify the contents of the /windows/winsxs folder. However I have a new installation of windows on a new drive and I'm unable to delete these files from the old drive. I get 'Access is denied'.

How could I go about deleting these, or any other, files on the old drive?

Please note that I do not wish to reformat the drive at this time. I'd like to only remove certain data to free up space.

vertigoelectric

Posted 2013-04-26T07:34:04.130

Reputation: 505

Besides the answer below you can always boot using a Linux LiveCD/USB and get rid of whatever you want, since Linux won't respect Windows file permissions. – Karan – 2013-04-26T16:44:07.133

Thanks for the info, but that would be more work than it's worth in this case. Besides, I was hoping for a "built-in" way to do it anyway. Thanks, though. – vertigoelectric – 2013-04-26T16:52:37.367

Yeah, just some additional info that might be handy some day, which is why I posted it as a comment. It is always handy to keep a copy of Linux around though, for system repair, data recovery, partitioning or even something as mundane as getting rid of files that Windows won't allow you to, no matter what. :) – Karan – 2013-04-26T17:04:30.093

Answers

8

Take Ownership

Right click on winsxs folder, Properties -> Security tab -> Advanced -> Owner tab -> Edit -> select your username, check 'Replace owner on subcontainers and objects' -> OK

Add Permissions

Right click on winsxs folder, Properties -> Security tab -> Edit -> select or add your user name -> check Full Control under Permissions -> OK

Propagate Permissions

Right click on winsxs folder, Properties -> Security tab -> Advanced -> Change Permissions -> check 'Include inheritable...' and 'Replace all child...' checkboxes -> OK

The folder is under your control now, so you can delete it and its content.

P.K.

Posted 2013-04-26T07:34:04.130

Reputation: 96

I found doing this on the non system drive root was far easier as there are so many other sub folders all over the place that needs to be done. (Yes, less secure, but its a non system drive. Benefit far outweighs the cons. And if you are doing something more advanced, then you are prob already above the need to know the knowledge in the first place. Thank you @P.K. – WORMSS – 2014-09-13T17:41:14.360

This seemed like it ought to do the trick but it didn't. I still get Access Denied. I also tried giving myself full access permissions after taking ownership and still no good. – vertigoelectric – 2013-04-26T08:01:37.263

Just added "Propagate permissions" step to the answer, it should solve the issue. – P.K. – 2013-04-26T08:30:36.147

I'll try it. However, i am curious... will this affect all subfolders as well? I'm actually wanting to delete a lot more than just that folder, so I'd like to modify permissions for the whole Windows folder (technically, /Windows.bak folder for me) – vertigoelectric – 2013-04-26T15:54:25.363