Discover The Article
Uninstallation of programs can be a big challenge on Windows computers, particularly when you cannot use the uninstall utility or wizard to get rid of the unwanted program. Some tools do not offer the options and you must remove them manually, something that can be a huge problem. You might want to uninstall the program because it is infected with some malicious software or it is not running as you expect. Whenever the program you need to uninstall does not appear on the Control Panel >> Programs and Features >> Settings >> Apps you will need to follow a different route to complete the uninstallation.
Cygwin is among the hard to uninstall programs that you might want to uninstall from your Windows computer. The open-source program from Red Hat is designed to allow people to run the programs written for Linux and Unix systems to run on Windows. That should tell you that it is not a basic program and its functionality is hard to understand. You might want to get rid of it because it downloaded into your computer accidentally or you no longer need it. This guide will help you do that easily.
So, how do you uninstall Cygwin?
Even though the uninstallation process of Cygwin is not a big deal, it is cumbersome. The reason behind that is that the uninstaller wizard of this program is not easily accessible. In other words, the Control Panel >> Programs and Features >> Settings >> Apps uninstallation process might not work. Each time you try it, you will always get a “Permission Denied” message.
You can remove other programs from your taskbar by unpinning them but in case of Cygwin, the case is different. To remove it, you have to uninstall it from your machine completely. Here is how to uninstall Cygwin.
Method 1: Using the Command Prompt
The biggest problem you will encounter when trying to uninstall the Cygwin program is the “permission denied” message. You will get the message when you try to uninstall it or to delete its folders and files. So, Command Prompt method allows you to avoid the problem. Even though the method feels unsafe for the inexperienced Windows operating system users, it is among the easiest. Follow these steps to complete the uninstallation.
- First, you need to stop all the running Cygwin services. Follow the installations on the official Cygwin FAQ page to remove all the running services. Usually, the installed services include cygserver, cron, sshd, apache, inetd and postgresql.
- Check whether any Cygwin processes are running in the background and use the Windows Task Manager to terminate them.
- Search for “Command Prompt” or “cmd” and right-click on it. Choose Run as Administrator.
- Use takeown/r/d y/f Cygwin command to access the Cygwin folder.
- Next use the icacls Cygwin/t /grant Everyone:F command to allow all users to access the Cygwin folder. At this stage, you can delete the Cygwin folder regardless of the account you are using.
- The rmdir /s /q cygwin command will delete the folder and all subfolders.
- Delete every file that the command fails to remove such as the desktop and Start Menu shortcuts.
- To delete everything in the Cygwin software folder, use regedit and open HKEY_LOCAL_MACHINE and HKEY-CURRENT-USER.
Method 2: Deleting through your Windows Explorer
You can still use Method 1 but without using the Command Prompt. Unfortunately, after ignoring the Command Prompt, most users will get the “Permission Denied” message on their screen. Here is how to resolve the issue.
- Repeat the Steps 1 and 2 in method 1 and try to delete the folder hosting the Cygwin program. If you manage to delete it immediately, the process is successful.
- But if the “Permission Denied” message hits your screen, you have to add the folder ownership to your account.
- When using Windows 10, right-click on your Cygwin folder and proceed to Properties >> Security. Search for the “Advanced” option and click on it. At this point, you should see the “Owner” option at the top linked to an account.
- Click on “Change” and choose the account you would want to set as the owner of your Cygwin folder. Click Ok and check the box immediately after “Replace owner on subcontainers and objects” message to own all the folders and files in the Cygwin folder.
- When using the old Windows systems or the Windows 10 does not allow you to manage the permissions, you will have to follow the same process but after restarting your computer in Safe Mode. Continue with Steps 7 and 8 from the first method.
Method 3: Uninstall through System Restore
The System Restore utility comes with Windows operating systems to help you restore the system to the previous state and remove any program that might interfere with your computer operations. If you had created a system restore point before installing the Cygwin program, the System Restore method will be helpful. It will help eradicate all the unwanted programs, including Cygwin. Remember to backup all your important files before proceeding. Here are the steps to follow.
- Close all open programs and files
- On your desktop, right-click on Computer and click on Properties
- Wait for system window to appear
- On the left-hand side of your System Window, click on System Protection and the System Properties window will popup.
- Click on “Choose a Different Restore Point” and choose Next
- Choose the time and date from the offered list and click on Next. Keep in mind that not all the drivers and programs you installed after that date and time might work properly and you will need to reinstall them.
- When the “Confirm Your Restore Point” windows popups up, click finish
- To confirm Cygwin uninstall, click on Yes
Method 4: Reinstall it to Uninstall
If the file needed to uninstall the Cygwin is missing or already corrupted, the uninstallation will not be possible. In such cases, reinstalling the Cygwin program will solve the issue. You can run the installer in the original disk or download the file from the internet to reinstall. At times, the installer will help you uninstall or repair the program too.
Method 5: Use third-party programs to do the uninstallation
Uninstallation of Cygwin requires computer knowledge and a lot of patience. Again, it is hard to guarantee that the manual uninstallation will uninstall the program completely and remove all its files. Incomplete uninstallation will leave many invalid and useless items in the registry. It might also affect the performance of your computer in the long term.
Many useless files will occupy the free space in your computer hard disk and slow down the computer speed. To avoid such issues, use the trusted third party uninstallation programs to scan your computer system. Search for all Cygwin files and remove them.
If you do not want to run any Unix or Linux programs on your Windows computer, you can use any of the above methods to uninstall the Cygwin program. If none of the manual methods works, you will have to try a reliable uninstaller program. The internet offers many of them at no charge.