rustup
rustup copied to clipboard
rustup component remove component-NOT-TOOLCHAIN-TARGET errors
Problem you are trying to solve
I ran rustup component list --installed
and saw that I had the component rust-std-wasm32-unknown-unknown
installed, which I wanted to delete. I thought that I could simply copy-paste the component name into the remove
command like this:
rustup component remove rust-std-wasm32-unknown-unknown
However, this doesn't work with remove
. I got the following unhelpful error message:
error: toolchain 'nightly-x86_64-apple-darwin' does not contain component 'rust-std-wasm32-unknown-unknown' for target 'x86_64-apple-darwin'
note: not all platforms have the standard library pre-compiled: https://doc.rust-lang.org/nightly/rustc/platform-support.html
help: consider using `cargo build -Z build-std` instead
(Also the last line doesn't make sense because I'm trying to uninstall something here, not install it.)
Solution you'd like
The command that actually works is:
rustup component remove --target wasm32-unknown-unknown rust-std
I would like it if rustup told me that. You could assume that the component names which are output by list
can also be passed back into rustup as a component name.
Notes
Version 1.25.1