Skip to main content

Module uninstall

Module uninstall 

Source
Expand description

Uninstall orchestrator — removes the Rusty-managed ML stack so a clean reinstall is possible without manual purging.

§Tenet (v0.3.0 remediation)

“Reinstall functionality is currently broken and DOES NOT WORK. Rusty uninstall AND force-reinstall options MUST be fully functional across shells (fish, bash, zsh) AND across OS’s (cross Linux distributions).”

This module existed in v0.2.0 as dead primitives (PackageManager::purge, purge_component_packages) that were never wired into a user-facing flow. It is now a real uninstall_stack() reachable via rusty uninstall.

§What it removes

  1. Python ML packages (pip) installed by Rusty components.
  2. ROCm/amdgpu system packages via the detected package manager (apt/dnf/ pacman/zypper) — cross-distro; skipped with --keep-rocm.
  3. /opt/rocm (sudo) — skipped with --keep-rocm.
  4. The env files Rusty wrote (~/.mlstack_env, the fish conf.d file) and the legacy source ~/.mlstack_env lines from ~/.bashrc / ~/.zshrc / ~/.config/fish/config.fish (cross-shell).
  5. The installed-component registry (~/.mlstack/installed.json).

Sudo steps shell out to sudo (the user authenticates); they are skipped (with a warning) if not root and sudo is unavailable, so the command never stalls on a hidden prompt.

Structs§

UninstallOptions
Options for uninstall_stack.
UninstallReport
A summary of what uninstall did.

Functions§

global_env_dir
Path to the managed global env (used by callers/tests).
uninstall_stack
Uninstall the Rusty-managed ML stack.