Package managers: update or upgrade?

dev

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

package manager language/system
bundle Ruby
pip Python
poetry Python
pipenv Python
npm javascript
yarn javascript
brew macOS
apt-get Debian
cargo Rust
stack Haskell
lein Clojure
dep Go
cpan Perl
mix Elixir
Click to reveal the answers
package manager language/system (sub)command name
bundle Ruby upgrade
pip Python go away2
poetry Python update
pipenv Python update
npm javascript update or upgrade
yarn javascript upgrade
brew macOS upgrade
apt-get Debian upgrade
cargo Rust update
stack Haskell update
lein Clojure ancient upgrade
dep Go ensure -update
cpan Perl upgrade
mix Elixir deps.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)?

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.

Footnotes

  1. or, y’know, upgrade ↩

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

Cite this post
@online{swift2019packageManagersUpdateOrUpgrade,
  author = {Ben Swift},
  title = {Package managers: update or upgrade?},
  url = {https://benswift.me/blog/2019/10/16/package-managers-update-or-upgrade/},
  year = {2019},
  month = {10},
  note = {AT-URI: at://did:plc:tevykrhi4kibtsipzci76d76/site.standard.document/3gp3hyjt4iean},
}