# Rustup



## yancy (Dec 19, 2022)

Hello,

A while back, I installed Rust using freshports lang/rust, which to my knowledge is the preferred method for installing and keeping a port up to date.  However, I am now trying to install rustup but I get the following error:


```
info: downloading installer
warning: it looks like you have an existing installation of Rust at:
warning: /usr/local/bin
warning: rustup should not be installed alongside Rust. Please uninstall your existing Rust first.
warning: Otherwise you may have confusion unless you are careful with your PATH
warning: If you are sure that you want both rustup and your already installed Rust
warning: then please reply `y' or `yes' or set RUSTUP_INIT_SKIP_PATH_CHECK to yes
warning: or pass `-y' to ignore all ignorable checks.
error: cannot install while Rust is installed
```

The reason I want to install rustup is to use other toolchains such as +nightly with cargo.  See the toolchain section.

In order to install rustup, must I bypass the freshports and uninstall rust?

Cheers


----------



## cracauer@ (Dec 19, 2022)

As it says, it is perfectly safe as long as you consciously adjust $PATH to point to the rust version you want at any given moment.

And if you run into trouble later you can always uninstall the port at that time.


----------



## SirDice (Dec 21, 2022)

yancy said:


> I installed Rust using freshports lang/rust,


You're not using freshports to install anything. Freshports is a website that shows lots of interesting information about ports and the ports tree in a convenient way.


----------

