Homebrew/homebrew — pull request #26683 by durka (2014-02-13 04:28:02+00:00)
Title: cleanup: new feature for skipping certain formulae entirely

So I wanted some disk space back, but you can pry my old compiled versions of OpenCV (for example) from my cold, dead... uh, hard drive. Anyway, I wanted a way to spare certain formulae from `brew cleanup`.

My implementation is a sentinel file, `Cellar/$formula/.reserved`. If it exists, `brew cleanup` doesn't cleanup any kegs or caches for that formula, unless `--force` is specified.

I also added commands to `reserve`/`unreserve` formulae, and an argument to `brew ls` to show them, just like `--pinned`. I edited the man page under Contributions, but I'm not sure that is the right way to do it.

I assume this isn't ready to merge as written, partly because I don't really know Ruby; that's why I didn't squash the commits yet. If you like the feature, please critique the idea and implementation.