windows10 下 卸载 cygwin
进入 官方, 下载符合自己操作系统的 Cygwin 安装程序(这个程序包含了 Cygwin 的安装、更新、卸载功能)
打开 Cygwin 安装程序,点击 下一步
选择 第三个安装类型 Install from Local Directory
此时程序会自动检测到你 Cygwin 的本地安装目录,如果没有,则手动将 Root Directory 改为 Cygwin 的本地安装目录
点击 是
点击下一步
重点来啦!
View 选择 Category
Package 选择 All
New 选择 Uninstall
点击 下一步
点击 下一步,等待卸载完成
卸载完成
然后可以再把 Cygwin 安装目录下的文件手动删完
附:官方文档
2.20.How do I uninstall all of Cygwin?
Setup has no automatic uninstall facility. The recommended method to remove all of Cygwin is as follows:
If you have any Cygwin services running, remove by repeating the instructions in https://cygwin.com/faq/faq.html#faq.setup.uninstall-service for all services that you installed. Common services that might have been installed are sshd, cron, cygserver, inetd, apache, postgresql, and so on.
Stop the X11 server if it is running, and terminate any Cygwin programs that might be running in the background. Exit the command prompt and ensure that no Cygwin processes remain. Note: If you want to save your mount points for a later reinstall, first save the output of mount -m as described at https://cygwin.com/cygwin-ug-net/mount.html.
If you installed cyglsa.dll by running the shell script /usr/bin/cyglsa-config as described in https://cygwin.com/cygwin-ug-net/ntsec.html, then you need to configure Windows to stop using the LSA authentication package. You do so by editing the registry and restoring /HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Lsa/Authentication Packages back to it’s original value of msv1_0, and then rebooting.
Delete the Cygwin root folder and all subfolders. If you get an error that an object is in use, then ensure that you’ve stopped all services and closed all Cygwin programs. If you get a ‘Permission Denied’ error then you will need to modify the permissions and/or ownership of the files or folders that are causing the error. For example, sometimes files used by system services end up owned by the SYSTEM account and not writable by regular users.
The quickest way to delete the entire tree if you run into this problem is to take ownership of all files and folders to your account. To do this in Windows Explorer, right click on the root Cygwin folder, choose Properties, then the Security tab. If you are using Simple File Sharing, you will need to boot into Safe Mode to access the Security tab. Select Advanced, then go to the Owner tab and make sure your account is listed as the owner. Select the ‘Replace owner on subcontainers and objects’ checkbox and press Ok. After Explorer applies the changes you should be able to delete the entire tree in one operation. Note that you can also achieve by using other tools such as icacls.exe or directly from Cygwin by using chown. Please note that you shouldn’t use the recursive form of chown on directories that have other file systems mounted under them (specifically you must avoid /proc) since you’d change ownership of the files under those mount points as well.
Delete the Cygwin shortcuts on the Desktop and Start Menu, and anything left by setup-x86{_64}.exe in the download directory. However, if you plan to reinstall Cygwin it’s a good idea to keep your setup-x86{_64}.exe download directory since you can reinstall the packages left in its cache without redownloading them.
If you added Cygwin to your system path, you should remove it unless you plan to reinstall Cygwin to the same location. Similarly, if you set your CYGWIN environment variable system-wide and don’t plan to reinstall, you should remove it.
Finally, if you want to be thorough you can delete the registry tree Software\Cygwin under HKEY_LOCAL_MACHINE and/or HKEY_CURRENT_USER. However, if you followed the directions above you will have already removed everything important. Typically only the installation directory has been stored in the registry at all.