~$ ./jackson.sh

Developers can't seem to agree on what command should get rid of a package

Published Wednesday, May 26, 2021

Every package manager should accept both "uninstall" and "remove" commands

Disclaimer: This blog post complains about something inconsequential and silly. However, it's worth talking about.

Has this ever happened to you?

$ sudo snap uninstall x
error: unknown command "uninstall", see 'snap help'.

Me too! I'm used to apt, so I often try to "uninstall" with snap when the correct verb is "remove".

Then I go work on a Python project and I do this:

$ pip remove x
ERROR: unknown command "remove"

Whoops. pip uses "uninstall" just like apt. Then I connect to a machine running CentOS and try to uninstall a package using yum:

$ yum uninstall x
No such command: uninstall. Please use /usr/bin/yum --help
It could be a YUM plugin command, try: "yum install 'dnf-command(uninstall)'"

Oh, of course. yum uses "remove".

The only program I know of that does it right is npm, accepting both "uninstall" and "remove". Why doesn't every package manager do this?

In case you're curious, here are some other package managers:

Package manager Verb
Brew uninstall
yay -Rns 🙄
vcpkg remove
cargo uninstall
NuGet delete
conda remove (it makes me irrationally angry that this is different from pip)
yarn remove (and only remove)
flatpak uninstall
choco uninstall

If you leave a comment with any more I'll add it to the table.

Comments (62)

Discuss on Reddit / Hacker News