Skip to content

Commit

Permalink
Document uninstaller subcommand for Unix
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoesters committed Dec 2, 2024
1 parent 23f913a commit a663b24
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 3 deletions.
4 changes: 2 additions & 2 deletions constructor/nsis/StandaloneUninstallerOptions.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ Function un.UninstCustomOptions_Show
Pop $UninstCustomOptions.RemoveCaches
${NSD_SetState} $UninstCustomOptions.RemoveCaches $UninstRemoveCaches_State
${NSD_OnClick} $UninstCustomOptions.RemoveCaches un.UninstRemoveCaches_Onclick
${NSD_CreateLabel} 5% "$5u" 90% 20u \
"This removes cache such as package caches and notices."
${NSD_CreateLabel} 5% "$5u" 90% 10u \
"This removes cache directories such as package caches and notices."
IntOp $5 $5 + 20

IntOp $5 $5 + 5
Expand Down
42 changes: 41 additions & 1 deletion docs/source/howto.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,44 @@ If you want to perform the uninstallation steps manually, you can:

### macOS and Linux

Remove the installation directory. Usually this is a directory in your user's home directory (user installs), or under `/opt` for system-wide installations.
:::{note}
The following sections requires installers to be built using the `uninstall_with_conda_exe` option.
This is currently only implemented for `conda-standalone` 24.11.0 and higher.

For other installers, all files need to be removed manually.
:::

Unlike Windows, macOS and Linux installers do not ship an uninstaller executable.
However, some standalone applications (like `conda-standalone`) provide an uninstaller subcommand.
The following can be used to uninstall an existing installation:

```bash
$ $INSTDIR/_conda constructor uninstall --prefix $INSTDIR
```

where `$INSTDIR` is the installation directory. This command recursively removes all environments
and removes shell initializers that point to `$INSTDIR`.

The command supports additional options to delete files outside the installation directory:

- `--remove-caches`:
Removes cache directories such as package caches and notices.
Not recommended with multiple conda installations when softlinks are enabled.
- `--remove-config-files {user,system,all}`:
Removes all configuration files such as `.condarc` files outside the installation directory.
`user` removes the files inside the current user's home directory
and `system` removes all files outside of that directory.
- `--remove-user-data`:
This removes user data files such as the `~/.conda` directory.

These options are not recommended if multiple conda installations are on the same system because
they delete commonly used files.

:::{note}
If removing these files requires superuser privileges, use `sudo -E` instead of `sudo` since
finding these files may rely on environment variables, especially `$HOME`.
:::

For more detailed implementation notes, see the documentation of the standalone application:

* [conda-standalone](https://github.com/conda/conda-standalone)

0 comments on commit a663b24

Please sign in to comment.