Error Permission denied when running brew cleanup
When I try to run `brew cleanup` I get:
Warning: Skipping atk: most recent version 2.34.1 not installed
Warning: Skipping git: most recent version 2.23.0_1 not installed
Warning: Skipping libgcrypt: most recent version 1.8.5 not installed
Warning: Skipping nspr: most recent version 4.23 not installed
Warning: Skipping nss: most recent version 3.46.1 not installed
Warning: Skipping poppler: most recent version 0.81.0 not installed
Error: Permission denied @ apply2files - /Users/iuliaulialiaia/Library/Caches/Homebrew/.cleaned
I can neither run other commands that uses `brew cleanup`, like `brew upgrade`:
...
==> `brew cleanup` has not been run in 30 days, running now...
Removing: /usr/local/Cellar/python@2/2.7.16... (3,750 files, 51.6MB)
Error: Permission denied @ apply2files - /Users/iuliaulialiaia/Library/Caches/Homebrew/.cleaned
P.S.: I cannot run homebrew as root:
Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.