tested on macos 10.13 with homebrew 1.7

manage packages with brew(1)

homebrew is a package manager for macos.

install

$ cd /tmp
$ curl -so install \
  https://raw.githubusercontent.com/Homebrew/install/master/install
$ less install
...
$ /usr/bin/ruby install
...
$

install a package

install a program with brew install, for example, entr(1):

$ brew install entr
==> Downloading https://…/entr-4.1.highsierra.bottle
################################################ 100.0%
==> Pouring entr-4.1.highsierra.bottle.tar.gz
🍺  /usr/local/Cellar/entr/4.1: 7 files, 40.7KB
$

uninstall a package

$ brew uninstall entr
Uninstalling /usr/local/Cellar/entr/4.1... (7 files, 40.7KB)
$

clean up

$ brew cleanup
...
==> This operation has freed approximatelly 130.2MB of disk space.
==> Removing cached downloads
...
==> This operation has freed approximatelly 91.2MB of disk space.
$

uninstall

$ cd /tmp
$ curl -so uninstall \
  https://raw.githubusercontent.com/Homebrew/install/master/uninstall
$ vis uninstall
...
$ /usr/bin/ruby uninstall --help
...
$