window下cygwin完全卸载办法

本文提供了一套详细的Cygwin卸载步骤,包括删除安装文件夹、停止服务、清理注册表条目和环境变量等,帮助用户彻底清除Cygwin残留。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

具体步骤如下:

1.删除安装用的临时文件夹(在cygwin里输入命令)

$ rm -f /cygdrive/c/你的临时文件夹

2.停止cron service

$ cygrunsrv --stop cron

$ cygrunsrv --remove cron

3.停止并删除inetd服务

$ net stop inetd

$/usr/sbin/inetd --remove-as-service

4.删除安装文件夹,默认是c:/cygwin

5.删除桌面上的icon,和开始菜单里的启动文件夹

6.删除注册表里的相关项

HKEY_LOCAL_MACHINE/SOFTWARE/Cygnus Solutions

HKEY_CURRENT_USER/Software/Cygnus Solutions

7.删除环境变量(PATH, CYGWIN)

环境变量PATH里的c:/cygwin/bin; 还有名叫CYGWIN的变量

 

 

 

==================cygwin官方的分割线==================

 

 

 

Cygwin目录及文件的删除 (2007-10-19 00:13:48)

今天整理下硬盘里乱七八糟的东西,太乱太多不好整理,删除一些东西。看到以前保存的网页才想到有个问题还没解决——还没把cygwin删掉。这个cygwin目录还是几年前装的,XP重装N次了,小天鹅也重装过几次,都用同一个目录。

原文章在这里,一样的问题:

Hi,
    I installed cygwin a few months ago(installed on XP). I reinstalled WindowsXP recently. But there are some files in cygwin installation
directory can be deleted. Could somebody help me?
Best wishes,
Peng

cygwin官方的Larry Hall给出了回答

  Presumably, you reinstalled XP but left the previously
installed Cygwin intact. 

  So now it's possible you have files that were installed via Cygwin originally with a user/uid that doesn't exist on your Windows system anymore.
  A "Cygwin" way to resolve this would be to 'chown' of all
your files to a uid that exists for your new installation.
You should be able to manipulate the files as that user.
  Alternatively, you could change the uid (not your SID!) of
your user in your /etc/passwd file to correspond with your
old uid. 

  Finally, you could take ownership of the Cygwin
tree using the Windows security property tab.  I expect
you could find other ways to solve this problem too. ;-)

 

也看了别人的文章

一般故障表现:
以用户X登陆机器并安装了cygwin后,用户Y或者域用户Z登陆该机器后无法删除cygwin及其子目录文件。
解决办法:
1。原安装用户不是管理员用户,可以以原安装用户登陆将需要做删除操作的用户加入完全访问权限或者加入所有者列表。
2。以系统管理员登陆将需要做删除操作的用户加入所有者列表。

 

  问题解决了。

 

 这个问题告诉我们,不管你遇到什么问题(困难),肯定有人在你之前就遇到过了,肯定就有解决的办法,因此要正视困难,并解决之。

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值