Skip to content

Adding Uninstall Docs #3092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Adding Uninstall Docs #3092

wants to merge 2 commits into from

Conversation

JJScar
Copy link

@JJScar JJScar commented Mar 13, 2025

Adding uninstalling guides for Starknet Foundry and Scarb for Linux, MacOS and Windows

Closes #
Issue #2768

Introduced changes

Files changes are the Install docs, where I added the uninstalling guide. In addition, the table of content has been
modified to align with the changes.

Checklist

  • Linked relevant issue
  • Updated relevant documentation
  • Added relevant tests
  • Performed self-review of the code
  • Added changes to CHANGELOG.md

@JJScar JJScar requested a review from a team as a code owner March 13, 2025 12:44
@JJScar JJScar requested review from ddoktorski and kkawula March 13, 2025 12:44
@@ -31,6 +31,10 @@ In this section, we will walk through the process of installing Starknet Foundry
* [Linux and macOS](#linux-and-macos-2)
* [Windows](#windows-2)
* [How to build Starknet Foundry from source code](#how-to-build-starknet-foundry-from-source-code)
* [Uninstalling](#uninstalling)
* [Linux and MacOS](#linux--macos)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: For consistency 😅 :

Suggested change
* [Linux and MacOS](#linux--macos)
* [Linux and macOS](#linux--macos)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh sorry about that 🥲

@@ -441,3 +445,91 @@ the [source code](https://github.com/foundry-rs/starknet-foundry) as follows:
2. Run `cd starknet-foundry && cargo build --release`. This will create a `target` directory.
3. Move the `target` directory to the desired location (e.g. `~/.starknet-foundry`).
4. Add `DESIRED_LOCATION/target/release/` to your `PATH`.

# Uninstalling
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use noun, same as we do for other sections.

Comment on lines 456 to 457
First, remove the plugin from `asdf`:
```bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Spacing (applies to all code blocks below):

Suggested change
First, remove the plugin from `asdf`:
```bash
First, remove the plugin from `asdf`:
```bash

@@ -441,3 +445,91 @@ the [source code](https://github.com/foundry-rs/starknet-foundry) as follows:
2. Run `cd starknet-foundry && cargo build --release`. This will create a `target` directory.
3. Move the `target` directory to the desired location (e.g. `~/.starknet-foundry`).
4. Add `DESIRED_LOCATION/target/release/` to your `PATH`.

# Uninstalling
This section will guide you in how to uninstall Starknet Foundry.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is redundant, reword or remove please.

@@ -441,3 +445,91 @@ the [source code](https://github.com/foundry-rs/starknet-foundry) as follows:
2. Run `cd starknet-foundry && cargo build --release`. This will create a `target` directory.
3. Move the `target` directory to the desired location (e.g. `~/.starknet-foundry`).
4. Add `DESIRED_LOCATION/target/release/` to your `PATH`.

# Uninstalling
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could be separate file, we could nest it under Installation in SUMMARY.md

Then just add a link to installation section to it as well.

Comment on lines 481 to 486
To ensure complete removal, delete Scarb-related files from the
asdf installation directory:
```bash
rm -rf ~/.asdf/installs/scarb
rm -rf ~/.asdf/plugins/scarb
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think we should maintain docs like this. If anywhere this should be in scarb docs.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I added it because it is pretty much the reverse of the installation. Should we just simply include the snforge uninstallation?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that keeping commands that run rm -rf on some files, if we aren't making sure these are up to date at all times is a bit risky.

This section will guide you in how to uninstall Starknet Foundry.

## Linux & MacOS
If you installed **Starknet Foundry** using `asdf`, follow these steps to remove it.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't provide any other installation instructions anyway. I'd just say something along the lines of "use these instructions to uninstall".

If you installed **Starknet Foundry** using `asdf`, follow these steps to remove it.

### Starknet-Foundry
First, remove the plugin from `asdf`:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's link this https://asdf-vm.com/manage/plugins.html#remove and say for details reference this link

Comment on lines 488 to 515
## Windows
### Remove Starknet Foundry Files
If you installed Starknet Foundry by extracting a ZIP file, manually delete the installation folder. The recommended location was:
```powershell
rm -r -Force "$env:LOCALAPPDATA\Programs\snfoundry"
```

Alternatively, you can delete it manually by navigating to:
📂 C:\Users\YourUsername\AppData\Local\Programs\snfoundry
Right-click the folder and select Delete.

### Remove Starknet Foundry from System PATH
If you added snfoundry/bin to your system PATH, you need to remove it:

For Windows 10 & 11:
1. Open the Start Menu, search for “Environment Variables”, and open Edit the system environment variables.
2. In the System Properties window, click Environment Variables.
3. Under System variables (or User variables), find the Path entry and select Edit.
4. Look for an entry similar to:
```
C:\Users\YourUsername\AppData\Local\Programs\snfoundry\bin
```
5. Select it and click Delete, then OK to save changes.

### Uninstall Universal Sierra Compiler (Optional, if installed)
If you installed Universal Sierra Compiler, remove it as well:
```powershell
rm -r -Force "$env:LOCALAPPDATA\Programs\universal-sierra-compiler"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if uninstallation docs are really needed for windows as installation is manual and pretty basic, I think everyone can recreate it without unnecessary docs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wdyt? @cptartur

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree we could simplify these, but maybe not remove them entirely.

@JJScar
Copy link
Author

JJScar commented Apr 2, 2025

There was a lot of discussion with a number of people, I have committed some changes. If there is still more to do let me know please!

Comment on lines +15 to +22
You can delete Starknet Foundry manually by navigating to:

```
📂 C:\Users\YourUsername\AppData\Local\Programs\snfoundry
```

Right-click the folder and select Delete.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This path is technically not always valid, it depends on where exactly user installed it. I'd just say something along the lines of "Delete the directory in which you extracted the binary". Maybe we can either say that it is usually %LOCALAPPDATA%\Programs\snfoundry or link to the relevant installation section so user can cross reference it.

Comment on lines +24 to +32
If you added snfoundry/bin to your system PATH, you need to remove it:

For Windows 10 & 11:

1. Open the Start Menu, search for “Environment Variables”, and open Edit the system environment variables.
2. In the System Properties window, click Environment Variables.
3. Under System variables (or User variables), find the Path entry and select Edit.
4. Look for an entry similar to:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, I'd just link to the specific installation section. We link to an article that explain how setting path works there, I'd prefer we don't keep any instructions on modifying it ourselves.

Comment on lines +40 to +47
If you installed Universal Sierra Compiler, remove it as well:

```powershell
rm -r -Force "$env:LOCALAPPDATA\Programs\universal-sierra-compiler"
```

Also, remove its bin path from system Environment Variables, following the same steps as above.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not optional, snforge will not run without USC so user must have installed it. I'd not include any untested powershell scripts, see my comments above.

Comment on lines +49 to +55
If you installed Scarb manually, remove it:

```powershell
rm -r -Force "$env:LOCALAPPDATA\Programs\scarb"
```

Then, remove scarb/bin from your system PATH using the steps mentioned earlier.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Comment on lines +57 to +65
### Verify Uninstallation
To ensure Starknet Foundry is fully removed, open a Command Prompt or PowerShell and run:

```powershell
snforge --version
sncast --version
```

If you see “command not found”, the uninstallation was successful.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is duplicating the lines we have above

@cptartur
Copy link
Member

Hey @JJScar please address the reviews above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants