Uninstall the Astra CLI
Follow the instructions for your original installation method to uninstall the Astra CLI.
Uninstall on macOS and Linux
Use these methods if you did not install the Astra CLI with a package manager.
To uninstall the Astra CLI on macOS and Linux, you can use either astra nuke or manually remove the files.
Use astra nuke on macOS and Linux (recommended)
-
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 then press Enter.
ResultDo 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, and then press Enter to continue.Only select yes if you don’t want to preserve your configuration profiles.
ResultAstra 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.
Manual removal on macOS and Linux
-
Optional: If you don’t want to preserve your configuration profiles, delete the
.astrarcfile:rm $(astra config path -p) -
Delete the Astra CLI home folder:
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.
Uninstall on Windows
To uninstall the Astra CLI on Windows, you can use the uninstaller, the astra nuke command, or manually remove the files:
Use the Windows uninstaller (recommended)
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.
Use astra nuke on 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.
ResultDo 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, and then press Enter to continue.Only select yes if you don’t want to preserve your configuration profiles.
ResultAstra 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.
Manual removal on Windows
-
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 folder:
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.
Uninstall with Homebrew
Only use this method if you installed the Astra CLI with Homebrew.
-
Delete the Astra CLI home folder (
~/.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.
ResultDo 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.
ResultAstra 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