mxcl/homebrew — Issue #10751: brew cleanup fails "Operation not permitted"
Author: whoisjake
Created: 2012-03-07 16:48:26+00:00
State: open

I noticed some commits to brew cleanup that made some changes regarding local cache of brew.

On two separate machines, when I run brew cleanup, I get:

````
Cronus:~ jake $ brew cleanup
Removing /Users/jake/Library/Caches/Homebrew/gfortran-4.2.4-5664.pkg...
Removing /Users/jake/Library/Caches/Homebrew/git-htmldocs-1.7.7.4.tar.gz...
Removing /Users/jake/Library/Caches/Homebrew/git-htmldocs-1.7.8.1.tar.gz...
Removing /Users/jake/Library/Caches/Homebrew/git-htmldocs-1.7.8.2.tar.gz...
Removing /Users/jake/Library/Caches/Homebrew/git-htmldocs-1.7.8.4.tar.gz...
Removing /Users/jake/Library/Caches/Homebrew/git-htmldocs-1.7.8.tar.gz...
Removing /Users/jake/Library/Caches/Homebrew/git-htmldocs-1.7.9.1.tar.gz...
Removing /Users/jake/Library/Caches/Homebrew/git-htmldocs-1.7.9.2.tar.gz...
Removing /Users/jake/Library/Caches/Homebrew/git-htmldocs-1.7.9.3.tar.gz...
Removing /Users/jake/Library/Caches/Homebrew/git-htmldocs-1.7.9.tar.gz...
Removing /Users/jake/Library/Caches/Homebrew/git-manpages-1.7.7.4.tar.gz...
Removing /Users/jake/Library/Caches/Homebrew/git-manpages-1.7.8.1.tar.gz...
Removing /Users/jake/Library/Caches/Homebrew/git-manpages-1.7.8.2.tar.gz...
Removing /Users/jake/Library/Caches/Homebrew/git-manpages-1.7.8.4.tar.gz...
Removing /Users/jake/Library/Caches/Homebrew/git-manpages-1.7.8.tar.gz...
Removing /Users/jake/Library/Caches/Homebrew/git-manpages-1.7.9.1.tar.gz...
Removing /Users/jake/Library/Caches/Homebrew/git-manpages-1.7.9.2.tar.gz...
Removing /Users/jake/Library/Caches/Homebrew/git-manpages-1.7.9.3.tar.gz...
Removing /Users/jake/Library/Caches/Homebrew/git-manpages-1.7.9.tar.gz...
Removing /Users/jake/Library/Caches/Homebrew/go--hg...
Error: Operation not permitted - /Users/jake/Library/Caches/Homebrew/go--hg
Cronus:~ jake $ brew doctor
Your system is raring to brew.
````

Of course, both machines give similar output, but it fails on these two caches:
````
Error: Operation not permitted - /Users/jake/Library/Caches/Homebrew/go--hg
````
and
````
Error: Operation not permitted - /Users/jake/Library/Caches/Homebrew/git--flow
`````

Here is the one from the laptop I have access to atm:

````
Cronus:~ jake $ ls -ahl /Users/jake/Library/Caches/Homebrew/ | grep "go--hg"
drwxr-xr-x 18 jake staff 612B Feb 3 09:46 go--hg
````