1

Doing ls -ltra /usr/local gives a lot of homebrew files and folders in /usr/local itself, as opposed to a subfolder:

$ ls -ltra /usr/local/
total 56
drwxr-xr-x@  12 root    wheel    408 13 Jul  2015 ..
drwxr-xr-x    7 65535   65535    238 24 Jul  2015 heroku
drwxr-xr-x    6 agrimm  admin    204 24 Jul  2015 foreman
-rw-r--r--    1 agrimm  admin    291  7 Oct  2015 .yardopts
-rw-r--r--    1 agrimm  admin   1241 15 Jan 16:19 LICENSE.txt
drwx------    8 agrimm  admin    272 15 Jan 16:25 var
drwxr-xr-x    8 agrimm  admin    272 15 Jan 16:31 etc
-rw-r--r--@   1 agrimm  admin   3161  4 Apr 14:48 CODEOFCONDUCT.md
-rw-r--r--    1 agrimm  admin    861 12 May 09:16 .travis.yml
drwxr-xr-x   34 agrimm  admin   1156 12 May 09:17 share
drwxr-xr-x  303 agrimm  admin  10302 23 Jun 09:21 lib
drwxr-xr-x   98 agrimm  admin   3332 23 Jun 09:22 include
-rw-r--r--@   1 agrimm  admin   4266 23 Jun 09:51 README.md
-rw-r--r--    1 agrimm  admin   1031 23 Jun 09:51 .gitignore
drwxr-xr-x    5 agrimm  admin    170 23 Jun 09:51 .github
drwxrwxr-x   21 root    admin    714 23 Jun 09:51 .
drwxr-xr-x   12 agrimm  admin    408 23 Jun 09:56 Library
drwxr-xr-x  256 agrimm  admin   8704  6 Jul 11:50 bin
drwxr-xr-x   60 agrimm  admin   2040  6 Jul 11:50 opt
drwxr-xr-x   60 agrimm  admin   2040  6 Jul 11:50 Cellar
drwxr-xr-x   15 agrimm  admin    510 13 Jul 10:50 .git

CODEOFCONDUCT.md, LICENSE.txt, README.md, .git, .gitignore, Library, bin, opt, Cellar and probably other files and folders refer to homebrew.

Is this normal for homebrew when I chose "Install" for Xcode, and then installed homebrew as per the following?

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/mkdir /usr/local

WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.

To proceed, enter your password, or type Ctrl-C to abort.

Password:
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local
==> /usr/bin/sudo /bin/mkdir /Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> Installing the Command Line Tools (expect a GUI popup):
==> /usr/bin/sudo /usr/bin/xcode-select --install
xcode-select: note: install requested for command line developer tools
Press any key when the installation has completed.
==> Downloading and installing Homebrew...
remote: Counting objects: 3660, done.
remote: Compressing objects: 100% (3491/3491), done.
remote: Total 3660 (delta 35), reused 673 (delta 28), pack-reused 0
Receiving objects: 100% (3660/3660), 2.97 MiB | 371.00 KiB/s, done.
Resolving deltas: 100% (35/35), done.
From https://github.com/Homebrew/homebrew
 * [new branch]      master     -> origin/master
HEAD is now at 3947f85 consul: add 0.5.2 bottle.
==> Installation successful!
==> Next steps
Run `brew help` to get started

For what it's worth, I've also installed cask.

2
  • 2
    Looks normal. Can have clashes with non-homebrew software. That's why some prefer homebrew install elsewhere. Commented Jul 13, 2016 at 6:01
  • Historical note: this question applies only to the Intel version of Homebrew; the Apple Silicon version keeps everything in /opt/homebrew instead, and won't install anything outside there. Commented Jun 22, 2023 at 13:28

2 Answers 2

2

Yes. That's how homebrew does.

You can usually trust

brew doctor

to tell if things are correct - it is pretty good about flagging anything amiss in /usr/local.

But to confirm your main question, the normal for homebrew it that it's noted for being "chatty" in that directory with many files and folders.

1
  • Also, you can save your brew list and blow away the installation, purge /usr/local and then watch what gets installed going forward... Commented Jul 16, 2016 at 11:30
2

Yes, homebrew adds some files and folders to /usr/local. You can see the full list in the root of the github repository https://github.com/homebrew/brew:

.github
Library
bin
etc/bash_completion.d
share
.gitignore
.travis.yml
.yardopts
CODEOFCONDUCT.md
LICENSE.txt
README.md
1
  • very nice list and explanation - less hand waving than my answer, too! Commented Jul 21, 2016 at 1:13

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.