Why is Homebrew finding phantom directories? I'm running Homebrew on macOS High Sierra 10.13.6. I use a bash alias brewup to periodically check on my installation.  brewup is defined as below:

alias brewup= 'brew update; brew upgrade; brew prune; brew cleanup; brew doctor'


Recently, when running brewup, the output from the brew prune portion of the command has been:

Pruned 0 symbolic links and 2 directories from /usr/local.

Every single time I run the brewupcommand, even after restarting, hand checking /usr/local for excess directories, recreating the brewup alias, and completely reinstalling Homebrew and all my packages, I  always get the output Pruned 0 symbolic links and 2 directories from /usr/local.  

The mystery deepenes even further, because when I run just brew prune, I get, as expected, no pruned results whatsoever. Something in the order of the commands contained in brewup is causing phantom excess directories to appear, over, and over, and over again.

Can someone help me exorcise these phantom directories?
Try brew prune --verbose to see which directories are removed.