Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I had cygwin installed in my last version of Windows. Reinstalled it, without first removing cygwin. The new installation kept all my old files. After the re installation, I chose to delete the old files but I can't find a way to remove cygwin. It keeps telling me that I don't have the permission to remove it.
Tried to delete it from Linux, Ubuntu from a Live USB, but it moved it into a Thrash folder and still can't delete it when I log into Windows again. Booted into Safe Mode, but can't find a way to change to the Administrator user (maybe there isn't one anymore on Windows 7? an administrator user by default, besides the first user created during installation).
I tried to change the permission from Properties -> Security but I get an Access denied error. Thank you

share|improve this question
I'm not sure about the permissions problem, but you can enable the built-in administrator account. Note that this may not help you with the permissions, and may open a security hole - it's disabled for a reason, since the built-in administrator account does not have UAC enabled. – Bob May 15 '12 at 10:28
@Bob doesn't work. I still get "Access denied". Even tried to run cmd as Administrator, still the same error. – Andrew May 15 '12 at 11:33
Possible duplicate of How can I delete the cygwin folder on my c drive? – DavidPostill Oct 8 '15 at 15:18

I also had this problem. I googled for an answer and arrived here, but none worked for me.

What I did:

I had to grant all accounts full access from the Security tab. Then I deleted the folder. Although it wasn't that easy. First, you will have to go into Advanced security settings to make yourself the "Owner" of the folder from owner tab (Check the box below too). After applying, I could grant myself access easily, and delete the folder.

share|improve this answer

If you feel familiar with a *nix environment (of course, you used cygwin), try the Live CD/USB again. But this time, use the console rm -rf command. Be very careful that you are actually deleting the correct folder, since that command can quite easily destroy your whole system.

I don't have a *nix environment to test in at the moment, but there was a flag (I, I think) that makes r (recursive) removal much safer with a confirmation prompt. You should probably use rm -rfI for this added safety.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .