I use homebrew-cask to install my Mac application bundles. Once installed, it means you can either script this or run from the shell:

$ brew update
$ brew cask install seamonkey

Unlike software from other *nix package managers, Mac applications usually update themselves once installed. Sparkle is the nicest way to do this, but Mozilla, LibreOffice and others bundle their own updaters. Regardless, it means the version homebrew-cask installed may not match the version you're currently running, which leads to this:

$ brew list | grep seamonkey
==> seamonkey
$ brew cask remove seamonkey
==> Error: seamonkey is not installed

I encountered this late at night the first time, and thought I was going crazy. The jury is still out on that, but the force command will allow its removal:

$ brew cask remove --force seamonkey
==> Removing App symlink: '/Users/ruben/Applications/SeaMonkey.app'

There’s a closed bug report on GitHub about this.