MacOS – Best Practices for dealing with unbrewed files in a fresh install of homebrew

homebrewinstallmacossymlinkterminal

I accidentally deleted /usr/local/bin which contained brew among other things. I reinstalled homebrew and ran brew prune to get rid of broken symlinks, but when I run brew doctor, I still get the following warning:

$ brew doctor
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
    /usr/local/lib/libtcl8.6.dylib
    /usr/local/lib/libtk8.6.dylib
Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
    /usr/local/include/fakemysql.h
    /usr/local/include/fakepq.h
    /usr/local/include/fakesql.h
    ...
Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .pc files:
    /usr/local/lib/pkgconfig/tcl.pc
    /usr/local/lib/pkgconfig/tk.pc
Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
    /usr/local/lib/libtclstub8.6.a
    /usr/local/lib/libtkstub8.6.a
Warning: You have uncommitted modifications to Homebrew
If this a surprise to you, then you should stash these modifications.
Stashing returns Homebrew to a pristine state but can be undone
should you later need to do so for some reason.
    cd /usr/local/Library && git stash && git clean -d -f

If you want to see the full list, check here: http://pastie.org/9663902

My question is, should I manually delete these files? According to this answer, I can simply leave the files (or move them to a separate folder and then run brew link <folder name> but since that answer is three years old (and about binaries specifically), I am checking to see if there is a more correct tactic.

Best Answer

For the most part they can be safely ignored unless there is a problem with additional software not installing. As per this comment from one of the developers. The brew doctor command is largely just there as a means of troubleshooting.