2016-07-28 61 views
13

如何使用堆栈工具卸载全局安装的Haskell软件包?如何卸载安装了堆栈的Haskell软件包?

stack --help显示不推荐使用卸载命令。

uninstall    DEPRECATED: This command performs no actions, and is 
          present for documentation only 
+0

可能的相关quesiton:http://stackoverflow.com/questions/37236892/force-stack-to-rebuild-an-installed-package/37237777#37237777 – ErikR

回答

8

由于stack --help表示,卸载不会做任何事情。您可以阅读关于此功能请求的此on the stack github,但由于各种原因,它最终被关闭而无需将行为添加到堆栈。因此,官方没有办法使用堆栈来卸载软件包。

要删除已安装堆栈的软件包,您需要手动执行此操作。这需要使用ghc-pkg取消注册,然后在系统上找到软件包的位置,然后通过其他工具或简单地将其删除。rm。例如,

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> 
+0

通过堆叠安装的软件包位于深在〜/ .stack/snapshots /内... – ErikR

+0

@ErikR这取决于配置。有些配置可能会转到.local,有些可能转到.stack,有些可能转到.stack-work – jkeuhlen

+0

什么是,我该如何找到它? – franssu

相关问题