Andon Mitev
Andon Mitev

Reputation: 1494

How to downgrade cargo to an earlier version?

Have following version:

cargo 1.52.0 (69767412a 2021-04-21)

and I want to downgrade to 1.51. How is that achievable?

Upvotes: 7

Views: 10352

Answers (1)

kmdreko
kmdreko

Reputation: 60002

If you want to use a specific version of the Rust toolchain, use rustup install <TOOLCHAIN> to download its components. You can verify it's available by using rustup show. Then you can set it as your default using rustup default <TOOLCHAIN>.

rustup install 1.51
rustup default 1.51

cargo should now use the 1.51 version unless otherwise overridden.

Upvotes: 15

Related Questions