Does cargo install have an equivalent update command?

w.brian picture w.brian · Dec 27, 2015 · Viewed 15.2k times · Source

I'd like to update a package that I used cargo install to globally install packages, such as rustfmt or racer. I can't find a way to update an installed package without first deleting it (via cargo uninstall) and then running the install command again. Is there an update command?

Answer

набиячлэвэли picture набиячлэвэли · Dec 5, 2016

There is no such command in vanilla cargo (well, there's cargo install but that's for dependencies), but since cargo supports third-party subcommands there is an answer: the cargo-update crate.

Install as usual with cargo install cargo-update, then use cargo install-update -a to update all installed packages, for more usage information and examples see the cargo install-update manpage.

Disclaimer: am author