1

I followed the instructions on this site and installed qbittorent. I run the command:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null ; brew install caskroom/cask/brew-cask 2> /dev/null

But then I decided that I want to undo everything that this command has done since the system had another torrent program already installed.

Here is the CLI history: enter image description here

Afterwards, the apple store poped up an update for the Xorg tools.

When I type brew command I get unknown command so I guess homebrew is not installed...

Can anyone explain what exactly this command did and how to undo it?

The reason for asking this is because I pasted the url of the site, from which I copied the command, in virustotal.com and it showed that the site is malicious. So I am worrying that the command might had anything "malicious" to download etc.

EDIT: Here is the content of /usr/local folder

drwxrwxr-x  2 user admin   68 Apr 24 11:52 Cellar
drwxrwxr-x  2 user admin   68 Apr 24 11:52 Frameworks
drwxrwxr-x  2 user admin   68 Apr 24 11:52 Homebrew
drwxrwxr-x  9 user admin  306 Feb  4 17:08 bin
drwxrwxr-x  2 user admin   68 Apr 24 11:52 etc
drwxrwxr-x  2 user admin   68 Apr 24 11:52 include
drwxrwxr-x  2 user admin   68 Apr 24 11:52 lib
drwxrwxr-x  2 user admin   68 Apr 24 11:52 opt
drwxr-xr-x  3 root wheel  102 Jun 13  2017 remotedesktop
drwxrwxr-x  2 user admin   68 Apr 24 11:52 sbin
drwxrwxr-x  4 user admin  136 Apr 24 11:52 share
drwxrwxr-x  2 user admin   68 Apr 24 11:52 var
  • Please share the output of ls -l /usr/local – Nimesh Neema Apr 25 '18 at 18:02
  • @NimeshNeema I updated my answer to include the folder you have asked for. Thanks. – BugShotGG Apr 26 '18 at 18:23
  • From the shared output, it is apparent that the Homebrew installation files are still present in /usr/local, i.e. is default installation location. Possible reason for missing brew command could be missing /usr/local/bin entry from $PATH variable. Try running echo $PATH and see if the directory is listed in the output. – Nimesh Neema Apr 26 '18 at 18:34
  • @NimeshNeema $PATH gives /usr/local/bin:/usr/bin:/usr/sbin:/sbin. I guess its something else? – BugShotGG Apr 26 '18 at 20:54
  • @NimeshNeema Any ideas on how to recover this? – BugShotGG Apr 29 '18 at 8:29
1

The instructions on the mentioned website led you to install Homebrew and Homebrew Cask, and use it to install qBittorrent. Homebrew is a community developed package manager for macOS.

To completely undo everything that this command did, first uninstall all packages that could have been possibly installed by Homebrew. To do so, follow these steps:

  1. Run brew list to list all the installed packages.

  2. For every listed package p, run brew uninstall p.

  3. Make sure that all Homebrew packages are removed by running brew list and verifying that the command doesn't give any output. Repeat step 2 until all the packages are uninstalled.

  4. Now run brew cask list. This should list all the packages installed via Homebrew Cask. The qBittorrent package should be listed as it was installed by following the instructions in the linked web-site.

  5. To completely remove a Homebrew Cask package, run brew cask zap p where p is the name of the package. For e.g., run brew cask zap qBittorrent to completely remove qBittorrent.

  6. Make sure that all Homebrew Cask packages are removed by running brew cask list and verifying that the command doesn't give any output. Repeat step 5 until all the packages are uninstalled.

  7. Finally, after removing all the packages, you can uninstall Homebrew itself by running the following command-line:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)".

Refer official Homebrew FAQ's for more details.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .