{
"$type": "site.standard.document",
"content": "---\ntitle: \"Package managers: <code>update</code> or <code>upgrade</code>?\"\ndescription: \"A quiz (and a plea for consistency) on whether your package manager uses\n update or upgrade.\"\ntags:\n - dev\n---\n\nQuick quiz: for the following language/system\n[package managers](https://en.wikipedia.org/wiki/Package_manager), what's the\nname of the subcommand to update[^or-upgrade] your project/system to the latest\nversion of one (or more) of your project's dependencies?\n\n[^or-upgrade]: or, y'know, upgrade\n\n| package manager | language/system |\n| --------------- | --------------- |\n| `bundle` | Ruby |\n| `pip` | Python |\n| `poetry` | Python |\n| `pipenv` | Python |\n| `npm` | javascript |\n| `yarn` | javascript |\n| `brew` | macOS |\n| `apt-get` | Debian |\n| `cargo` | Rust |\n| `stack` | Haskell |\n| `lein` | Clojure |\n| `dep` | Go |\n| `cpan` | Perl |\n| `mix` | Elixir |\n\n<button onclick='document.getElementById(\"answer-table\").style.visibility=\"visible\";'>click\nto reveal the answers</button>\n\n| package manager | language/system | (sub)command name |\n| --------------- | --------------- | --------------------- |\n| `bundle` | Ruby | `upgrade` |\n| `pip` | Python | go away[^pip] |\n| `poetry` | Python | `update` |\n| `pipenv` | Python | `update` |\n| `npm` | javascript | `update` or `upgrade` |\n| `yarn` | javascript | `upgrade` |\n| `brew` | macOS | `upgrade` |\n| `apt-get` | Debian | `upgrade` |\n| `cargo` | Rust | `update` |\n| `stack` | Haskell | `update` |\n| `lein` | Clojure | `ancient upgrade` |\n| `dep` | Go | `ensure -update` |\n| `cpan` | Perl | `upgrade` |\n| `mix` | Elixir | `deps.update` |\n\n[^pip]: https://github.com/pypa/pip/issues/59\n\nFor bonus points, which of them _also_ recognise the \"other\" subcommand but it\ndoes something different? For even more bonus points, when does that \"other\"\noption do something unwanted/destructive/irreversible (assuming that all you\nwant to do is update that dependency to the latest version)?\n\n:::tip\n\nLook, I'm not at all saying that you should just go and blindly\n`update`/`upgrade` all of the things---that's clearly a bad idea. But it still\ntakes me a non-zero amount of time as I switch between languages/tools to sit\nand think \"ok, for this project do I want to `update` or `upgrade`\"? And that\nmakes me sad.\n\n:::\n\nIf there's a deep, principled (or even a shallow, pragmatic) reason to pick one\nor the other then we should observe it, and do it _consistently_. Even if\nthere's not, we should toss a coin and be consistent anyway.\n\nIf any of the above commands are incorrect, or if there's a better way, then\n[let me know](mailto:ben.swift@anu.edu.au).\n",
"createdAt": "2026-05-13T23:14:57.422Z",
"description": "A quiz (and a plea for consistency) on whether your package manager uses update or upgrade.",
"path": "/blog/2019/10/16/package-managers-update-or-upgrade",
"publishedAt": "2019-10-16T00:00:00.000Z",
"site": "at://did:plc:tevykrhi4kibtsipzci76d76/site.standard.publication/self",
"tags": [
"dev"
],
"textContent": "A quiz (and a plea for consistency) on whether your package manager uses update or upgrade.",
"title": "Package managers: <code>update</code> or <code>upgrade</code>?"
}