5

I upgraded to the latest OpenOffice (from 3.4.1 to 4.1.1) with brew-cask without realizing OpenOffice 4 was already installed:

$ brew cask install openoffice
==> Downloading http://downloads.sourceforge.net/sourceforge/openofficeorg.mirror/Apache_OpenOffice_4.1.1_MacOS_x86-64_install_en-US.dmg
######################################################################## 100.0%
==> Symlinking App 'OpenOffice.app' to '/Users/shwaydogg/Applications/OpenOffice.app'
🍺  openoffice staged at '/opt/homebrew-cask/Caskroom/openoffice/4.1.1' (3180 files, 385M)

I'm worried that the old install with ~400MB is still there just not linked. Or does brew-cask writing the the symlink over the old app effectively delete the files? / Perhaps BrewCask was smart enough to take this into account?

How could I check?


update: did as @njbook suggested in comments:

$ brew-cask cleanup
==> Removing dead symlinks
Nothing to do
==> Removing cached downloads
/Library/Caches/Homebrew/openoffice-4.1.1.dmg
/Library/Caches/Homebrew/Casks/openoffice-4.1.1.dmg

There's no mention of the an old install being removed.

Another way to phrase my question perhaps more directly is in a unix system if a directory is replaced with a symlink pointing elsewhere are the files within the directory still taking up space on disk and if so how can they be found?

  • "Perhaps BrewCask was smart enough to take this into account?” Perhaps. If not, running brew cleanup usually does the job. – njboot Apr 1 '15 at 12:18
5

Cask does not clean up old versions by default. It stages the installs in /opt/homebrew-cask/Caskroom/$APPNAME and then symlinks them in to ~/Applications or /Applications depending on the brew recipe. And then it leaves the old versions around until you run brew cleanup.

You can see old installs of OpenOffice under /opt/homebrew-cask/Caskroom/openoffice. You can safely delete the old installs from there, though brew cleanup is supposed to do this for you.

If you had previously installed OpenOffice using their DMG installer and not Homebrew Cask, it was most likely installed in /Applications and not ~/Applications. Cask won't install over top of an existing installation that wasn't previously Cask-installed itself. So check /Applications and make sure you remove the old version from there if hadn't installed it via Cask. If you had installed it via Cask all you need to do is delete it from /opt/homebrew-cask/Caskroom/openoffice as mentioned above.

  • 1
    Thanks Ian! A rm -rf /Applications/OpenOffice.app later and good to go!. The obvious next question is how to install "globally" and answer (even if clunky) looks to be: brew cask install --appdir="/Applications" openoffice. -- source: github.com/caskroom/homebrew-cask/issues/2261 – Shwaydogg Apr 1 '15 at 16:38
  • 1
    @Shwaydogg yes, that's how you install globally instead of just for you. – Ian C. Apr 1 '15 at 16:42
  • 1
    Also found this for permanently installing to /Applications: Add the following to .bashrc export HOMEBREW_CASK_OPTS="--appdir=/Applications" -- source comment section here:computers.tutsplus.com/tutorials/… – Shwaydogg Apr 1 '15 at 17:05

You must log in to answer this question.

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