Rustup self uninstall error

While running rustup self update, my vps ran out of space, and this seems to have put cargo and rustup into an error state.

rustup self update, rustup self uninstall and any cargo command, all yield the immediate error:
error: missing key: 'version'

There is now space on the machine. Is there any way to recover my rustup installation? Or uninstall and then reinstall it, given that self uninstall is also not working?

Simply deleting the rustup directory should work. You may also want to clean up the PATH environment variable but if you're going to reinstall anyway then it's probably not necessary.

mv ~/.rustup ~/.rustup-backup
followed by reinstalling rust, did the trick.

thanks @chrisd!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.