'How to remove GHC 9.2.1 on Windows 10 that has been installed via chocolatey?

I have installed ghc 9.2.1 via chocolatey on Windows 10. I tried to remove it with choco uninstall ghc and it says that one package has been removed. But I can see that ghc has not been removed since the folder C:\tools\ghc-9.2.1 as well as folder C:\tools\msys64 are not empty. When I issue the command ghc --version I get the following (meaning that ghc is still there).

PS C:\Users\ephra> ghc --version
The Glorious Glasgow Haskell Compilation System, version 9.2.1

However, issuing choco uninstall ghc, I get this:

C:\WINDOWS\system32>choco uninstall ghc
Chocolatey v0.11.3
Uninstalling the following packages:
ghc
ghc is not installed. Cannot uninstall a non-existent package.

Should I remove simply the folder C:\tools\ (with subfolders ghc-9.2.1 and msys64)?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source