首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在macos上完全卸载flutter并以正确的方式重新安装?

如何在macos上完全卸载flutter并以正确的方式重新安装?
EN

Stack Overflow用户
提问于 2021-04-25 02:46:39
回答 1查看 533关注 0票数 0

我在我的macOs BigSur上安装flutter时遇到了一个问题,因为我把flutter的路径设置错了,把一切都搞砸了。

我只是想要一种完全卸载flutter并以正确的方式重新安装它的方法。

代码语言:javascript
复制
ro:~ yahyasaleh$ which flutter
YAHYAs-MacBook-Pro:~ yahyasaleh$ 
YAHYAs-MacBook-Pro:~ yahyasaleh$ flutter docker
-bash: flutter: command not found
YAHYAs-MacBook-Pro:~ yahyasaleh$  echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:[/Users/yahyasaleh/Developer/flutter/bin]/flutter/bin
YAHYAs-MacBook-Pro:~ yahyasaleh$ git clean -xfd
fatal: not a git repository (or any of the parent directories): .git
YAHYAs-MacBook-Pro:~ yahyasaleh$ git stash save --keep-index
fatal: not a git repository (or any of the parent directories): .git
YAHYAs-MacBook-Pro:~ yahyasaleh$ git stash drop
fatal: not a git repository (or any of the parent directories): .git
YAHYAs-MacBook-Pro:~ yahyasaleh$ git pull
fatal: not a git repository (or any of the parent directories): .git
YAHYAs-MacBook-Pro:~ yahyasaleh$ flutter doctor
-bash: flutter: command not found
YAHYAs-MacBook-Pro:~ yahyasaleh$ rm -rf
YAHYAs-MacBook-Pro:~ yahyasaleh$ which flutter
YAHYAs-MacBook-Pro:~ yahyasaleh$ git clean -xfd
fatal: not a git repository (or any of the parent directories): .git
YAHYAs-MacBook-Pro:~ yahyasaleh$ 
EN

回答 1

Stack Overflow用户

发布于 2021-04-25 02:49:33

Flutter是一个SDK,您可以将其下载并解压缩到Mac中的目录中。没有自动卸载过程,就像没有自动安装过程一样。你通过下载一个zip文件并解压缩它来“安装”它。您所要做的就是删除您将其解压到的目录的内容。

即使是能够从系统中的任何位置调用颤动命令的路径添加,也必须手动完成。如果你这样做了,那么你也可以将它从你的shell路径中删除。

您可以rm -rf sdk文件夹,或者,如果您只是想清理损坏,请在Flutter安装目录中运行以下命令:

代码语言:javascript
复制
git clean -xfd
git stash save --keep-index
git stash drop
git pull
flutter doctor
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67246319

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档