如何卸载随堆栈一起安装的Haskell软件包? [英] How to uninstall a Haskell package installed with stack?
问题描述
如何卸载通过堆栈工具全局安装的Haskell软件包?
How can I uninstall a Haskell package installed globally with stack tool?
stack --help
表示已弃用卸载命令.
stack --help
shows that uninstall command is deprecated.
uninstall DEPRECATED: This command performs no actions, and is
present for documentation only
推荐答案
如stack --help
所述,卸载不会执行任何操作.您可以在请求此功能的堆栈github 上了解堆栈由于各种原因而被关闭而不希望将行为添加到堆栈中.因此,正式而言,无法使用堆栈来卸载软件包.
As stack --help
says, uninstall doesn't do anything. You can read about this on the stack github where this feature was requested, but it ended up being closed without the desire to add the behavior to stack, for various reasons. So, officially, there is no way to use stack to uninstall a package.
要删除已堆叠安装的软件包,您需要手动执行.这需要使用ghc-pkg注销,然后找到软件包在系统上的位置,然后通过其他工具或简单地rm
将其删除.例如
To remove a package that stack installed, you need to manually do so. This entails using ghc-pkg unregister and then finding the location of the package on your system and removing it via another tool or simply rm
. For example,
stack install <package name>
# Now remove the package
ghc-pkg unregister <pkg-id>
cd /path/to/stack/packages # This could be something like ~/.local/bin, but is configuration dependent
rm <package name>
这篇关于如何卸载随堆栈一起安装的Haskell软件包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!