Uninstall the Astra CLI
Follow the instructions for your original installation method to uninstall the Astra CLI.
-
macOS and Linux
-
Windows
-
Homebrew
Select one of the following methods to uninstall the Astra CLI on macOS and Linux:
-
astra nukecommand (recommended) -
Manual removal
-
Run the
astra nukecommand:astra nukeResult
_____ __ / _ \ _______/ |_____________ / /_\ \ / ___/\ __\_ __ \__ \ / | \\___ \ | | | | \ //__ \_ \____|__ /____ > |__| |__| (____ / \/ \/ \/ Version: x.x.x Are you sure you want to entirely delete Astra CLI from your system? This action is irreversible and will delete all Astra CLI files from your system. yes > no (default) ↑↓ to navigate, Enter to select, type to filter -
When prompted to continue, select yes and press Enter.
Result
Do you also want to delete the .astrarc file located at /Users/username/.astrarc? (You can still Ctrl+C to safely cancel this operation.) Your credentials may be lost if you do. A backup is recommended. yes > no (default) -
Select whether to delete the
.astrarcfile.Only select yes if you don’t want to preserve your configuration profiles.
Press Enter to continue.
Result
Astra CLI Nuke Summary Files deleted: → /Users/username/.astra (contained binary) Shell profiles containing astra: → /Users/username/.zprofile Files skipped: → /Users/username/.astrarc - User chose to keep the file -
Optional: If the
astra nukecommand found any shell profiles containing references to theastracommand, you can manually delete these references.
-
Optional: If you don’t want to preserve your configuration profiles, delete the
.astrarcfile:rm $(astra config path -p) -
Delete the Astra CLI home directory:
rm -rf $(astra config home path -p) -
Delete the
astrabinary if it still exists:rm -f $(which astra) -
Optional: Manually remove any references to the
astracommand from your shell profile. For example, from~/.zprofileor~/.bash_profile.
Select one of the following methods to uninstall the Astra CLI on Windows:
-
Uninstaller (recommended)
-
astra nukecommand -
Manual removal
Only use this method if you installed the Astra CLI using the scripted installer.
-
Optional: If you don’t want to preserve your configuration profiles, delete the
.astrarcfile:rm -f $(astra config path -p) -
In your Windows Settings, uninstall the Astra CLI app. For specific instructions, see Uninstall or remove apps and programs in Windows.
-
Run the
astra nukecommand:astra nukeResult
_____ __ / _ \ _______/ |_____________ / /_\ \ / ___/\ __\_ __ \__ \ / | \\___ \ | | | | \ //__ \_ \____|__ /____ > |__| |__| (____ / \/ \/ \/ Version: x.x.x Are you sure you want to entirely delete Astra CLI from your system? This action is irreversible and will delete all Astra CLI files from your system. yes > no (default) ↑↓ to navigate, Enter to select, type to filter -
When prompted to continue, select yes and press Enter.
Result
Do you also want to delete the .astrarc file located at <astra_cli_config_path>? (You can still Ctrl+C to safely cancel this operation.) Your credentials may be lost if you do. A backup is recommended. yes > no (default) -
Select whether to delete the
.astrarcfile.Only select yes if you don’t want to preserve your configuration profiles.
Press Enter to continue.
Result
Astra CLI Nuke Summary Files deleted: → <astra_cli_home_directory> (contained binary) Shell profiles containing astra: → <user_shell_profile_path> Files skipped: → <astra_cli_config_path> - User chose to keep the file -
Optional: Manually remove
astrafrom your systemPATH. For more information, see the Microsoft PowerShell documentation.
-
Optional: If you don’t want to preserve your configuration profiles, delete the
.astrarcfile:rm -f $(astra config path -p) -
Delete the Astra CLI home directory:
rm -r -f $(astra config home path -p) -
Delete the
astrabinary if it still exists:rm -f (Get-Command astra).Source -
Optional: Manually remove
astrafrom your systemPATH. For more information, see the Microsoft PowerShell documentation.
-
Delete the Astra CLI home directory (
~/.astra) and optionally its configuration file (~/.astrarc):-
Run the
astra nukecommand:astra nukeResult
_____ __ / _ \ _______/ |_____________ / /_\ \ / ___/\ __\_ __ \__ \ / | \\___ \ | | | | \ //__ \_ \____|__ /____ > |__| |__| (____ / \/ \/ \/ Version: x.x.x Are you sure you want to entirely delete Astra CLI from your system? This action is irreversible and will delete all Astra CLI files from your system. yes > no (default) ↑↓ to navigate, Enter to select, type to filter -
When prompted to continue, select yes and press Enter.
Result
Do you also want to delete the .astrarc file located at /Users/username/.astrarc? (You can still Ctrl+C to safely cancel this operation.) Your credentials may be lost if you do. A backup is recommended. yes > no (default) -
Select whether to delete the
.astrarcfile.Only select yes if you don’t want to preserve your configuration profiles.
Press Enter to continue.
Result
Astra CLI Nuke Summary Files deleted: → /Users/username/.astra Files skipped: → /Users/username/.astrarc - User chose to keep the file To complete the uninstallation, please use Homebrew to uninstall the Astra CLI binary.
-
-
Uninstall the Astra CLI using Homebrew:
brew uninstall datastax/astra-cli/astra