- Как удалить доморощенный с Mac OS 2021
- WWDC 2020 Special Event Keynote — Apple
- Как удалить и удалить Homebrew в Mac OS
- Вариант 2. Удаление Homebrew вручную с помощью сценария удаления
- How to Uninstall Homebrew from Mac OS
- How to Uninstall & Remove Homebrew in Mac OS
- Option 2: Uninstalling Homebrew with the Uninstall Script Manually
- Как удалить Homebrew из Mac OS
- Как удалить и удалить Homebrew в Mac OS
- Вариант 2. Удаление Homebrew с помощью сценария удаления вручную
- How to Uninstall Packages with Homebrew
- How to Uninstall & Remove Homebrew Packages
- Additional Homebrew Package Uninstall Options
- Managing Dependencies when Uninstalling Homebrew Packages
Как удалить доморощенный с Mac OS 2021
WWDC 2020 Special Event Keynote — Apple
Если вы ранее установили Homebrew на Mac и решили, что вам больше не нужен или нужен менеджер пакетов командной строки, вы можете удалить Homebrew из MacOS и полностью удалить Homebrew и все установленные пакеты и формулы с Mac.
Из этого туториала Вы узнаете, как полностью удалить Homebrew с Mac. Это означает, что он удалит весь менеджер пакетов вместе с удалением команд brew и cask, а также различных пакетов программного обеспечения, которые могли быть установлены. Примечательно, что это полностью отличается от простого удаления отдельных пакетов с помощью Homebrew, то есть, как вы бы удалили конкретную формулу из менеджера пакетов.
Как удалить и удалить Homebrew в Mac OS
Есть несколько способов удалить Homebrew и удалить его с Mac. Возможно, самый простой способ — использовать одну командную строку, введенную в Терминал, так же, как вы запускаете команду ruby и curl в командной строке для установки Homebrew, вы также запускаете команду ruby и curl для удаления Homebrew с Mac.
Единственная команда для удаления Homebrew выглядит следующим образом:
ruby -e «$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)»
Он использует ruby для запуска сценария удаления Homebrew, который загружается из github с помощью команды curl. При правильном выполнении сценарий удаления будет запущен на Mac и полностью удалит Homebrew.
Вариант 2. Удаление Homebrew вручную с помощью сценария удаления
Если вам не нравится идея выполнения скрипта, загруженного из Интернета, с помощью curl (что понятно для тех, кто заботится о безопасности), то вы также можете заранее просмотреть, загрузить и просмотреть скрипт деинсталляции, а затем выполнить его вручную на компьютер, с которого вы хотите удалить Homebrew.
Скрипт удаления Homebrew находится по следующему URL:
Сохраните этот файл в виде текстового документа, помеченного как «удалить» или «удалить домохозяйство», или как хотите, чтобы он назывался, а затем выполните команду как обычно. В качестве альтернативы вы можете запустить скрипт удаления с флагом –help, чтобы получить более подробную информацию и параметры:
Независимо от того, используете ли вы какой-либо из методов, описанных выше, Homebrew будет удален. Это также удалит все пакеты с ним, но если вы хотите удалить только формулу и пакеты, а не Homebrew полностью, вам следует вместо этого сосредоточиться на этих инструкциях.
Последний вариант, который мы не будем здесь рассматривать из-за сложности и изменчивости конфигурации каждого пользователя и установленных пакетов, состоит в том, чтобы вручную удалить все каталоги, зависимости, формулу и все связанные файлы Homebrew из широкого диапазона. Расположение директории Homebrew, включая удаление каждого отдельного элемента в папке установленного пакета Homebrew на Mac. Это гораздо более длительный процесс, и вы будете копаться в различных каталогах системного уровня. Этот метод не подходит для подавляющего большинства пользователей — как продвинутых, так и других — и поэтому не распространяется на него. Но если вам интересно, используйте команды find, locate и mdfind, чтобы найти все данные, относящиеся к Homebrew, brew, cask и Cellar на Mac.
Вот и все, если вы запустили сценарии удаления Homebrew, процесс довольно прост и удаление завершено. Конечно, если вам нужен Homebrew и вы используете его, нет причин его деинсталлировать, но если вы случайно установили Homebrew и обнаружили, что он вам не нужен, возможно, имеет смысл удалить его с вашего Mac.
Источник
How to Uninstall Homebrew from Mac OS
If you have previously installed Homebrew to a Mac and have now decided that you no longer need or want the command line package manager, you can uninstall Homebrew from MacOS and completely remove Homebrew and all installed packages and formula from the Mac.
This tutorial will walk through how to completely uninstall Homebrew from a Mac, meaning it will remove the entire package manager itself, along with removing the brew and cask commands, along with the various software packages that may have been installed. Notably, this is completely different from simply uninstalling individual packages with Homebrew, which is how you’d remove a particular formula from the package manager.
How to Uninstall & Remove Homebrew in Mac OS
There are a few ways to uninstall Homebrew and remove it from a Mac. Perhaps the simplest method is using a single command string entered into the Terminal, just as you run a ruby and curl command in the command line to install Homebrew, you also run a ruby and curl command to uninstall Homebrew from a Mac.
The single command to uninstall Homebrew is as follows, depending on your version of MacOS:
For uninstalling Homebrew in MacOS Catalina, macOS Big Sur, and MacOS Mojave:
/bin/bash -c «$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)»
For uninstalling Homebrew from MacOS High Sierra, Sierra, El Capitan, and earlier:
ruby -e «$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)»
This uses ruby to execute the Homebrew uninstall script that is downloaded from github with the curl command. When executed properly, the uninstall script will run on the Mac and completely remove Homebrew.
Option 2: Uninstalling Homebrew with the Uninstall Script Manually
If you don’t like the idea of executing a script downloaded from the internet with curl (which is understandable for security conscious individuals), then you can also view, download, and review the uninstall script beforehand, and then execute it manually on the computer that you wish to remove Homebrew from.
The Homebrew uninstall script is located at the following URL:
Save that file as a text document labeled “uninstall” or “uninstallhomebrew” or whatever you want to call it, and then execute the command as usual. Alternatively, you can run the uninstall script with –help flag to get more details and options:
Whether you use either method outlined above, Homebrew will be uninstalled. This will also remove any packages with it, but if you only want to uninstall certain formula and packages rather than Homebrew entirely you should instead focus on these instructions.
The last option, which we’re not going to cover here due to complexity and variability of each users configuration and what packages they have installed, is to manually delete all Homebrew directories, dependencies, formula, and all related files from the wide-ranging Homebrew directory locations, including removing every individual item in the Homebrew installed package location of the Mac. That’s a much more time consuming process, and you’ll be digging around in a variety of system level directories. This method is inappropriate for the vast majority of users – advanced or otherwise – and thus will not be covered. But if you’re curious, use the find, locate, and mdfind commands to discover all Homebrew, brew, cask, and Cellar related data on the Mac.
That’s about it, assuming you ran the Homebrew uninstall scripts the process is pretty straight forward and the removal is complete. Of course if you need and use Homebrew there is no reason to uninstall it, but if you happened to install Homebrew and later discovered it’s of no use to you, it’s perhaps relevant to remove it from your Mac.
Источник
Как удалить Homebrew из Mac OS
Если вы ранее установили Homebrew на Mac и теперь решили, что вам больше не нужен или не нужен диспетчер пакетов командной строки, вы можете удалить Homebrew из MacOS и полностью удалить Homebrew и все установленные пакеты и формулы с Mac.
В этом руководстве будет рассмотрено, как полностью удалить Homebrew с Mac, что означает удаление всего самого диспетчера пакетов, а также удаление команд brew и cask, а также различных пакетов программного обеспечения, которые могли быть установлены. Примечательно, что это полностью отличается от простого удаления отдельных пакетов с помощью Homebrew, когда вы удаляете определенную формулу из диспетчера пакетов.
Как удалить и удалить Homebrew в Mac OS
Есть несколько способов удалить Homebrew и удалить его с Mac. Возможно, самый простой метод — использовать одну командную строку, введенную в Терминал, точно так же, как вы запускаете команду ruby и curl в командной строке для установки Homebrew, вы также запускаете команду ruby и curl для удаления Homebrew с Mac.
Единственная команда для удаления Homebrew выглядит следующим образом, в зависимости от вашей версии MacOS:
Для удаления Homebrew в MacOS Catalina, macOS Big Sur и MacOS Mojave:
/bin/bash -c «$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)»
Для удаления Homebrew из MacOS High Sierra, Sierra, El Capitan и более ранних версий:
ruby -e «$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)»
Он использует ruby для выполнения сценария удаления Homebrew, который загружается с github с помощью команды curl. При правильном выполнении сценарий удаления запустится на Mac и полностью удалит Homebrew.
Вариант 2. Удаление Homebrew с помощью сценария удаления вручную
Если вам не нравится идея выполнения сценария, загруженного из Интернета с помощью curl (что понятно для людей, заботящихся о безопасности), вы также можете предварительно просмотреть, загрузить и просмотреть сценарий удаления, а затем выполнить его вручную на компьютер, с которого вы хотите удалить Homebrew.
Скрипт удаления Homebrew находится по следующему URL-адресу:
Сохраните этот файл как текстовый документ с пометкой «удалить» или «деинсталлировать homebrew» или как вы хотите это назвать, а затем выполните команду как обычно. Кроме того, вы можете запустить сценарий удаления с флагом –help, чтобы получить дополнительные сведения и параметры:
Независимо от того, используете ли вы любой из описанных выше методов, Homebrew будет удален. Это также приведет к удалению всех пакетов с ним, но если вы хотите удалить только определенную формулу и пакеты, а не полностью Homebrew, вам следует вместо этого сосредоточиться на этих инструкциях.
Последний вариант, который мы не собираемся здесь рассматривать из-за сложности и изменчивости конфигурации каждого пользователя и установленных пакетов, — это вручную удалить все каталоги Homebrew, зависимости, формулы и все связанные файлы из широкого диапазона Расположение каталогов Homebrew, включая удаление каждого отдельного элемента в расположении установленного пакета Homebrew на Mac. Это гораздо более трудоемкий процесс, и вы будете копаться в различных каталогах системного уровня. Этот метод не подходит для подавляющего большинства пользователей — опытных или нет — и поэтому не будет рассмотрен. Но если вам интересно, используйте команды find, locate и mdfind, чтобы обнаружить все данные, связанные с Homebrew, brew, cask и Cellar на Mac.
Вот и все, если вы запустили сценарии удаления Homebrew, процесс довольно прост, и удаление завершено. Конечно, если вам нужно и вы используете Homebrew, нет причин для его удаления, но если вы установили Homebrew и позже обнаружили, что он вам не нужен, возможно, имеет смысл удалить его с вашего Mac.
Источник
How to Uninstall Packages with Homebrew
If you have installed Homebrew on a Mac to use as a package manager for various unix and command line utilities, you’ve probably also installed a handful of packages deemed useful to you. But what if you no longer need one, and you want to remove a particular Homebrew package?
It turns out that uninstalling packages / formula with Homebrew is very easy, and uninstalling and removing packages from Homebrew is just as easy as installing them in the first place.
To be clear, we’re not talking about uninstalling Homebrew itself, we’re just talking about removing particular packages from Homebrew.
How to Uninstall & Remove Homebrew Packages
The proper way to remove a Homebrew package is with the uninstall or remove command.
The uninstall Homebrew package command looks like this:
brew uninstall packageName
The remove Homebrew package command looks like this:
brew remove packageName
As you may have guessed by now, the remove and uninstall commands are exactly the same, and get the same result; the removal of the Homebrew package.
For example, to remove and uninstall Telnet (assuming you installed telnet on the Mac with Homebrew anyway), you would use the following command string:
brew uninstall telnet
Or you can use the remove command for the same effect:
brew remove telnet
Removing a package from Homebrew is quick, as there is no need to download anything, it just deletes the Homebrew package from the Mac.
You can confirm the package was removed by trying to run the command again, or by checking where Homebrew packages are installed to and you will find the package you removed is no longer there.
Additional Homebrew Package Uninstall Options
There are two flags you can pass to the Homebrew uninstall command as well; –force and –ignore-dependencies.
The –force flag (or -f) will forcibly remove the package along with deleting all versions of that package / formula.
The –ignore-dependencies flag does just what it sounds like, it will ignore dependencies for the formula in question when uninstalling the designated package.
Managing Dependencies when Uninstalling Homebrew Packages
One thing to be mindful of when removing and uninstalling packages from Homebrew is that if the package being uninstalled has dependencies that are in use by another package or formula, then that may break it causing the secondary package to no longer work correctly. Perhaps the simplest way to prevent that is to use the optional –ignore-dependencies flag. For example:
brew uninstall —ignore-dependencies telnet
If you are not sure what dependencies exist with a particular Homebrew package, you can use the deps command to find that out:
brew deps packageName
For example, if you installed python3 on the Mac using the Homebrew approach, which has a fair amount of dependencies, running that command would look something like the following:
% brew deps python3
gdbm
openssl
readline
sqlite
xz
Since many other packages also use those dependencies, if you were to remove python3 you’d almost certainly want to issue the –ignore-dependencies flag. The same applies to node.js and npm, and many other popular Homebrew packages.
Do you know of any other methods or tips related to uninstalling Homebrew packages and formula? Share with us in the comments below!
Источник