在 Windows 10 64 位中彻底卸载 Cygwin
1、查看 C 盘,Cygwin 已经安装,C:\cygwin64。如图1
2、在导航中找到 Cygwin64 Terminal,右键 – 卸载。如图2
3、搜索程序和功能:cygwin,结果为空。如图3
4、找到之前的安装包,D:\Soft\setup-x86_64.exe。如图4
5、选择第 1 项,从 Intemet 安装(下载的文件将保留以备将来使用)。如果之前有下载,且有保留,建议选择第 3 项,从本地目录安装。如图5
6、选择 Cygwin 的之前安装的目录,默认为:C:\cygwin64,无需改动。如图6
7、选择本地软件包目录。修改为:D:\Soft\Cygwin。如图7
8、进展。该页面显示下载或安装的进度。报错:Internal Error: gcrypt library error 1 unsupported pk alg.。如图8
9、决定下载最新版本的安装包:http://www.cygwin.com/setup-x86_64.exe 。然后再次重复上述步骤。最新版本的安装包,未再报错。成功进入 Select Packages 界面。如图9
10、在 View 下拉列表中选择:Category,然后在 All 这一行的 New 列,选择 Uninstall。点击下一步。如图10
11、卸载完成。如图11
12、但是发现安装目录:C:\cygwin64 仍然存在。如图12
13、决定再次卸载。取消勾选 Hide obsoleete packages。即显示已经过时的软件包。重复第 10 步骤。如图13
14、在 Resolving Dependencies 页面中,取消勾选 Accept default problem solutions。即不接受默认问题解决方案。全部卸载。如图14
15、如果继续,某些软件包可能无法正常工作。您确定要继续 (不推荐) 吗?确定。如图15
16、但是发现安装目录:C:\cygwin64 仍然存在。虽然目录有所减少。如图16
17、新建文件:uninstall.bat,内容如下。
1 2 3 4 | SET DIRECTORY_NAME="C:\cygwin64" C:\Windows\System32\takeown /f %DIRECTORY_NAME% /r /d y C:\Windows\System32\icacls %DIRECTORY_NAME% /grant administrators:F /t PAUSE |
18、运行成功后,发现安装目录:C:\cygwin64 仍然存在。不符合预期。如图17
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | E:\Develop\2020\0807 - 在 Windows 10 64 位中卸载 Cygwin>SET DIRECTORY_NAME="C:\cygwin64" E:\Develop\2020\0807 - 在 Windows 10 64 位中卸载 Cygwin>C:\windows\system32\TAKEOWN /f "C:\cygwin64" /r /d y 成功: 此文件(或文件夹): "C:\cygwin64" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\Cygwin-Terminal.ico" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\Cygwin.bat" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\Cygwin.ico" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\dev" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\home" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\lib" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\tmp" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\usr" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\var" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\dev\fd" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\dev\mqueue" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\dev\shm" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\dev\stderr" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\dev\stdin" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\dev\stdout" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\bash_completion.d" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\fstab" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\fstab.d" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\hosts" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\mtab" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\networks" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\nsswitch.conf" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\pki" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\postinstall" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\preremove" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\profile.d" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\protocols" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\rebase.db.x86_64" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\services" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\setup" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\skel" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\pki\ca-trust" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\pki\ca-trust\source" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\pki\ca-trust\source\ca-bundle.legacy.crt" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\postinstall\000-cygwin-post-install.sh.done" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\postinstall\base-files-mketc.sh.done" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\postinstall\base-files-profile.sh.done" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\postinstall\bash.sh.done" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\postinstall\ca-certificates.sh.done" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\postinstall\coreutils.sh.done" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有 。 成功: 此文件(或文件夹): "C:\cygwin64\etc\postinstall\man-db.sh.done" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\postinstall\mintty.sh.done" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\preremove\base-files.sh.done" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\preremove\ca-certificates.sh.done" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\preremove\coreutils.sh.done" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\preremove\man-db.sh.done" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\preremove\_autorebase.sh.done" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有 。 成功: 此文件(或文件夹): "C:\cygwin64\etc\setup\installed.db" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\setup\setup.rc" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\etc\setup\timestamp" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\home\Administrator" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\home\Administrator\.bashrc" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\home\Administrator\.bash_history" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\home\Administrator\.bash_profile" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\home\Administrator\.inputrc" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\home\Administrator\.minttyrc" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\home\Administrator\.profile" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\lib\groff" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\lib\groff\groff_opts_with_arg.txt" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有 。 成功: 此文件(或文件夹): "C:\cygwin64\usr\local" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\usr\share" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\usr\src" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\usr\tmp" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\usr\local\bin" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\usr\local\etc" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\usr\local\lib" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\usr\share\doc" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\usr\share\info" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\usr\share\doc\man-db" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\usr\share\doc\xz" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\usr\share\doc\man-db\man-db-manual.txt" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\usr\share\doc\xz\faq.txt" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\usr\share\info\.stamp" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\usr\share\info\dir" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\var\log" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\var\run" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\var\tmp" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\var\log\setup.log" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\var\log\setup.log.full" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 成功: 此文件(或文件夹): "C:\cygwin64\var\run\utmp" 现在由用户 "LAPTOP-9S1INV5O\Administrator" 所有。 E:\Develop\2020\0807 - 在 Windows 10 64 位中卸载 Cygwin>C:\windows\system32\ICACLS "C:\cygwin64" /grant administrators:F /t 已处理的文件: C:\cygwin64 已处理的文件: C:\cygwin64\Cygwin-Terminal.ico 已处理的文件: C:\cygwin64\Cygwin.bat 已处理的文件: C:\cygwin64\Cygwin.ico 已处理的文件: C:\cygwin64\dev 已处理的文件: C:\cygwin64\etc 已处理的文件: C:\cygwin64\home 已处理的文件: C:\cygwin64\lib 已处理的文件: C:\cygwin64\tmp 已处理的文件: C:\cygwin64\usr 已处理的文件: C:\cygwin64\var 已处理的文件: C:\cygwin64\dev\fd 已处理的文件: C:\cygwin64\dev\mqueue 已处理的文件: C:\cygwin64\dev\shm 已处理的文件: C:\cygwin64\dev\stderr 已处理的文件: C:\cygwin64\dev\stdin 已处理的文件: C:\cygwin64\dev\stdout 已处理的文件: C:\cygwin64\etc\bash_completion.d 已处理的文件: C:\cygwin64\etc\fstab 已处理的文件: C:\cygwin64\etc\fstab.d 已处理的文件: C:\cygwin64\etc\hosts 已处理的文件: C:\cygwin64\etc\mtab 已处理的文件: C:\cygwin64\etc\networks 已处理的文件: C:\cygwin64\etc\nsswitch.conf 已处理的文件: C:\cygwin64\etc\pki 已处理的文件: C:\cygwin64\etc\postinstall 已处理的文件: C:\cygwin64\etc\preremove 已处理的文件: C:\cygwin64\etc\profile.d 已处理的文件: C:\cygwin64\etc\protocols 已处理的文件: C:\cygwin64\etc\rebase.db.x86_64 已处理的文件: C:\cygwin64\etc\services 已处理的文件: C:\cygwin64\etc\setup 已处理的文件: C:\cygwin64\etc\skel 已处理的文件: C:\cygwin64\etc\pki\ca-trust 已处理的文件: C:\cygwin64\etc\pki\ca-trust\source 已处理的文件: C:\cygwin64\etc\pki\ca-trust\source\ca-bundle.legacy.crt 已处理的文件: C:\cygwin64\etc\postinstall\000-cygwin-post-install.sh.done 已处理的文件: C:\cygwin64\etc\postinstall\base-files-mketc.sh.done 已处理的文件: C:\cygwin64\etc\postinstall\base-files-profile.sh.done 已处理的文件: C:\cygwin64\etc\postinstall\bash.sh.done 已处理的文件: C:\cygwin64\etc\postinstall\ca-certificates.sh.done 已处理的文件: C:\cygwin64\etc\postinstall\coreutils.sh.done 已处理的文件: C:\cygwin64\etc\postinstall\man-db.sh.done 已处理的文件: C:\cygwin64\etc\postinstall\mintty.sh.done 已处理的文件: C:\cygwin64\etc\preremove\base-files.sh.done 已处理的文件: C:\cygwin64\etc\preremove\ca-certificates.sh.done 已处理的文件: C:\cygwin64\etc\preremove\coreutils.sh.done 已处理的文件: C:\cygwin64\etc\preremove\man-db.sh.done 已处理的文件: C:\cygwin64\etc\preremove\_autorebase.sh.done 已处理的文件: C:\cygwin64\etc\setup\installed.db 已处理的文件: C:\cygwin64\etc\setup\setup.rc 已处理的文件: C:\cygwin64\etc\setup\timestamp 已处理的文件: C:\cygwin64\home\Administrator 已处理的文件: C:\cygwin64\home\Administrator\.bashrc 已处理的文件: C:\cygwin64\home\Administrator\.bash_history 已处理的文件: C:\cygwin64\home\Administrator\.bash_profile 已处理的文件: C:\cygwin64\home\Administrator\.inputrc 已处理的文件: C:\cygwin64\home\Administrator\.minttyrc 已处理的文件: C:\cygwin64\home\Administrator\.profile 已处理的文件: C:\cygwin64\lib\groff 已处理的文件: C:\cygwin64\lib\groff\groff_opts_with_arg.txt 已处理的文件: C:\cygwin64\usr\local 已处理的文件: C:\cygwin64\usr\share 已处理的文件: C:\cygwin64\usr\src 已处理的文件: C:\cygwin64\usr\tmp 已处理的文件: C:\cygwin64\usr\local\bin 已处理的文件: C:\cygwin64\usr\local\etc 已处理的文件: C:\cygwin64\usr\local\lib 已处理的文件: C:\cygwin64\usr\share\doc 已处理的文件: C:\cygwin64\usr\share\info 已处理的文件: C:\cygwin64\usr\share\doc\man-db 已处理的文件: C:\cygwin64\usr\share\doc\xz 已处理的文件: C:\cygwin64\usr\share\doc\man-db\man-db-manual.txt 已处理的文件: C:\cygwin64\usr\share\doc\xz\faq.txt 已处理的文件: C:\cygwin64\usr\share\info\.stamp 已处理的文件: C:\cygwin64\usr\share\info\dir 已处理的文件: C:\cygwin64\var\log 已处理的文件: C:\cygwin64\var\run 已处理的文件: C:\cygwin64\var\tmp 已处理的文件: C:\cygwin64\var\log\setup.log 已处理的文件: C:\cygwin64\var\log\setup.log.full 已处理的文件: C:\cygwin64\var\run\utmp 已成功处理 82 个文件; 处理 0 个文件时失败 E:\Develop\2020\0807 - 在 Windows 10 64 位中卸载 Cygwin>PAUSE 请按任意键继续. . . |
19、Shift + Delete 强制删除安装目录:C:\cygwin64。为所有当前项目执行此操作。是。彻底删除成功。如图19
20、在系统菜单中仍然存在:Cygwin – Cygwin64 Terminal。如图20
21、按 Win + R 打开运行,输入 regedit,按回车键,即可打开注册表。HKEY_CURRENT_USER\Software\Cygwin。需要删除。如图21
22、在系统菜单中仍然存在:Cygwin – Cygwin64 Terminal。右键 – 更多 – 打开文件位置。如图22
23、文件:C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Cygwin\Cygwin64 Terminal。删除目录:C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Cygwin。如图23
24、在系统菜单中已不存在:Cygwin – Cygwin64 Terminal。如图24
25、在注册表中查找:Cygwin,无结果。到此为止,在 Windows 10 64 位中已经彻底卸载 Cygwin。如图25
近期评论