I am cleaning up my MacBook and would like to know the basic /usr/ filesystem structure so that I can delete components that are not essential in running my system, in order to have an idea about what not to touch. I got curious about this after cleaning out the /usr/local/ directory to reinstall Homebrew and to save storage on my laptop.
So the following is what I see at /usr/ with my Terminal:
lrwxr-xr-x 1 root wheel 8 Dec 25 2018 X11 -> /opt/X11
lrwxr-xr-x 1 root wheel 8 Dec 25 2018 X11R6 -> /opt/X11
drwxr-xr-x 971 root wheel 31072 May 22 05:52 bin
drwxr-xr-x 265 root wheel 8480 Jun 5 23:39 include
drwxr-xr-x 322 root wheel 10304 Jun 5 23:39 lib
drwxr-xr-x 250 root wheel 8000 May 22 05:52 libexec
drwxr-xr-x 15 root wheel 480 Jul 14 07:09 local
drwxr-xr-x 239 root wheel 7648 May 22 05:52 sbin
drwxr-xr-x 46 root wheel 1472 Oct 19 2018 share
drwxr-xr-x 5 root wheel 160 Sep 21 2018 standalone
Is there anything not needed that I can prune in this directory? Or should I leave things as they are?
I think it would be better to leave it as it is.
for example: the bin
include
lib
folder contains the installed applications and compiled libraries on your Mac, so you could remove something from it and then once of the dependencies will be upset.
I believe it's better to not change any thing inside the usr
folder