Skip to content

Package managers: <code>update</code> or <code>upgrade</code>?

dev

Quick quiz: for the following language/system package managers, what’s the name of the subcommand to update[1] your project/system to the latest version of one (or more) of your project’s dependencies?

package managerlanguage/system
bundleRuby
pipPython
poetryPython
pipenvPython
npmjavascript
yarnjavascript
brewmacOS
apt-getDebian
cargoRust
stackHaskell
leinClojure
depGo
cpanPerl
mixElixir

package managerlanguage/system(sub)command name
bundleRubyupgrade
pipPythongo away[2]
poetryPythonupdate
pipenvPythonupdate
npmjavascriptupdate or upgrade
yarnjavascriptupgrade
brewmacOSupgrade
apt-getDebianupgrade
cargoRustupdate
stackHaskellupdate
leinClojureancient upgrade
depGoensure -update
cpanPerlupgrade
mixElixirdeps.update

For bonus points, which of them also recognise the “other” subcommand but it does something different? For even more bonus points, when does that “other” option do something unwanted/destructive/irreversible (assuming that all you want to do is update that dependency to the latest version)?

TIP

Look, I’m not at all saying that you should just go and blindly update/upgrade all of the things—that’s clearly a bad idea. But it still takes me a non-zero amount of time as I switch between languages/tools to sit and think “ok, for this project do I want to update or upgrade”? And that makes me sad.

If there’s a deep, principled (or even a shallow, pragmatic) reason to pick one or the other then we should observe it, and do it consistently. Even if there’s not, we should toss a coin and be consistent anyway.

If any of the above commands are incorrect, or if there’s a better way, then let me know.


  1. or, y’know, upgrade ↩︎

  2. https://github.com/pypa/pip/issues/59 ↩︎