Due to Cygwin/X never have uninstall facility by Setup tool, we have to do some method manually if need to remove all Cygwin/X component.
How to do it?
Stop and Remove any Cygwin Services
If the Cygwin services (# 1) such as sshd are running, we have to stop all services by using cygrunsrv –E sshd commandand uninstall all service by using cygrunsrv –R ssh command.
Delete the Cygwin root folder and all subfolders
Based on the logon account, we will take ownership of the recursive files and folders of the Cygwin installation path by using takeown /r /f c:\cygwin commandSo does that the status is as follows:
AS-ISTO-BE
We also have to delegate Full Access to Everyone in the recursive files and folders of the Cygwin installation path by using icacls c:\cygwin /t /grant Everyone:F command.So does that the status is as follows:
AS-ISTO-BE
In the moment, we can completely delete the cygwin folder and its subfolders by using rmdir /s c:\cygwin command.
Delete key from registry
Start...Run... regedit and Delete Cygwin keys from registry tree “Computer\HKEY_CURRENT_USER\Software”Delete the system variable (option)
To remove the Environment Variable as 'CYGWIN' if ever create it.Delete the related Account (option)
To remove the related account as cyg_server & sshd if ever create it in the installation process.Until now, the Cygwin/X will be uninstalled clearly.
Reference(# 1) we can know what services are running now by using cygrunsrv –list on the prompt command.
沒有留言:
張貼留言