简体   繁体   English

如何从 mac 完全卸载 symfony 和 composer

[英]How to completely uninstall symfony and composer from a mac

I want to completely remove symfony and composer from my mac.我想从我的 mac 中完全删除 symfony 和 composer。 I have been googling for five hours and no documentation can be found on how to uninstall composer and symfony completely from my mac.我已经在谷歌上搜索了五个小时,但没有找到关于如何从我的 mac 完全卸载 composer 和 symfony 的文档。 Why is that so hard to find?为什么这么难找? even on the Symfony website.甚至在 Symfony 网站上。

Symfony on your computer is just a folder containing the framework and the structure of the files, so you can delete that folder and you are done.您计算机上的 Symfony 只是一个包含框架和文件结构的文件夹,因此您可以删除该文件夹并完成。 Composer is just an binary file (phar) that can run on the command line. Composer 只是一个可以在命令行上运行的二进制文件(phar)。 Locate where that file is and delete it.找到该文件所在的位置并将其删除。

Symfony could be anywhere on your mac. Symfony 可以在你 Mac 上的任何地方。

The 'installer' for mac that comes from here https://symfony.com/download (dd 2019/10) dumps symfony in your home directory in ~/.symfony .来自https://symfony.com/download (dd 2019/10) 的 mac 的“安装程序”将 symfony 转储到 ~/.symfony 的主目录中。 I dislike that, too.我也不喜欢这样。

ls -al ~/.symfony

if it's there,如果它在那里,

rm -rf ~/.symfony

That 'installer' suggests you may want to move it here该“安装程序”建议您可能要将其移至此处

ls -al /usr/local/bin/symfony

if it's there如果它在那里

rm -rf /usr/local/bin/symfony

I agree with the above answer to我同意上面的回答

rm -rf ~/.symfony

but you do not need to run ls to check beforehand, if it's there, it is going to be deleted.但是你不需要事先运行 ls 来检查,如果它在那里,它将被删除。 If not, it is being ignored.如果不是,则将其忽略。

Better do最好做

whereis symfony 

to check where your binary is and delete it.检查您的二进制文件在哪里并将其删除。

Last but not least check if you have installed it via apt, this is a valid solution:最后但并非最不重要的检查您是否已通过 apt 安装它,这是一个有效的解决方案:

cd /etc/apt/sources.list.d  && ls | grep symfony-cli
sudo rm symfony-cli.list && sudo apt update

This will avoid checking for updates on every apt update这将避免在每个 apt 更新时检查更新

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM