3

I am running Homebrew on 10.13.6, with the prefix /usr/local.

When I run brew upgrade, two directories are created in /usr/local/share. These are: /usr/local/share/man/man2, and /usr/local/share/man/man6. There are no files in these directories.

Meanwhile, whenever I run brew prune --verbose, I get the output:

rmdir /usr/local/share/man/man6
rmdir /usr/local/share/man/man2
Pruned 0 symbolic links and 2 directories from /usr/local

Whenever brew upgrade, these two troublesome directories are then re-created! The cycle continues, on and on and on. I have repeatedly run brew update, brew cleanup, and brew doctor. I have even reinstalled Homebrew and all my packages. Yet, the eternal battle between brew upgrade and brew prune continues.

How can I get them to stop fighting?

  • 3
    That looks like a homebrew bug - best to report it – user151019 Sep 15 '18 at 11:31
  • Not seeing any point to homebrew, I've never bothered with it, but answer me this... why do you care? Some package you have installed, creates man2 ("Unix and C system calls") and man6 ("Games"), and doesn't put anything in them. The later --prune removes them again, since they're empty. That seems to be the function of --prune? – Marc Wilson Sep 15 '18 at 16:44
2

There is an inelegant solution to this bug/inconsistency in the two functions of the tools: put any file in the directories in question.

Then brew prune will stop removing them because they will no longer be empty. If brew prune is no longer removing them, brew upgrade won't create them. If you're concerned about space, you could even put an alias file in the directories.

In the grand scheme of things, having these empty folders create and then removed is a harmless side effect and doesn’t really break anything functionally.

You must log in to answer this question.

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