How to undo a software installation process in Mac Mini with OSX 10.11 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)" &lt; /dev/null 2&gt; /dev/null ; brew install caskroom/cask/brew-cask 2&gt; /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:


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
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:


Run brew list to list all the installed packages.
For every listed package p, run brew uninstall p.
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.
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.
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.
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.
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.