I ran this command accidentally when I was trying to give Homebrew access to write some symlinks:

sudo install -d -o $(whoami) -g admin /usr/local/include

and I realized by the -d flag would create a new include directory.

Now the /usr/local/include directory is empty and I can't seem to find any obvious damage done to my system.

Could someone please tell me what usually is in /usr/local/include and what I should do to rebuild its content?

  • You can always re-download your OS version and run the install again. It won’t do any harm if you’re already running that version. It will replace files back to default such as this directory.
    – Jahhein
    Dec 17, 2017 at 1:08
  • @Jahhein Do I need to back up (say with Time Machine) before doing that?
    – harvey_qiu
    Feb 3, 2018 at 13:57
  • You should always have a backup with any device. But no, you don’t need to. You download it from the App Store and it’ll show up like any application and be deleted after running it again.
    – Jahhein
    Feb 3, 2018 at 13:58
  • The reason you should have a backup is because it might change configurations you had previously. You might find that worse than the issue you have already.
    – Jahhein
    Feb 3, 2018 at 13:59

1 Answer 1


In base MacOS /usr/local is empty so /usr/local/include just contains what you have installed.

So either

  1. The best way restore from a backup

  2. Delete /usr/local/* and reinstall Homebrew and any other files you have installed there.

  • Thank you! I think I did lose a few tools that I previously installed with Homebrew and that's pretty much it.
    – harvey_qiu
    Feb 3, 2018 at 13:53

You must log in to answer this question.

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