Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I downgrade or install an older version of a tool I installed with `cargo install`?

I would like to install Xargo v0.3.10 on my machine. The current version of Xargo is v0.3.11 and it is installed by the cargo install xargo command. How can I install an older version of Xargo?

like image 360
Dragonight Avatar asked Apr 03 '18 21:04

Dragonight


1 Answers

cargo install --version 0.3.10 xargo

Reading the help for the cargo tool is very useful:

$ cargo install --help
cargo-install
Install a Rust binary

USAGE:
    cargo install [OPTIONS] [--] [crate]...

OPTIONS:
        --version <VERSION>      Specify a version to install from crates.io

[... snip ...]

If you've already installed a version of the tool, you'll need to add the -f / --force flag:

-f, --force                  Force overwriting existing crates or binaries

See also:

  • Does cargo install have an equivalent update command?
  • How can a binary installed with cargo install be removed?
like image 96
Shepmaster Avatar answered Oct 14 '22 22:10

Shepmaster