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:

  • Manual removal

  1. Optional: If you don’t want to preserve your configuration profiles, delete the .astrarc file:

    rm $(astra config path -p)
  2. Delete the Astra CLI home directory:

    rm -rf $(astra config home path -p)
  3. Delete the astra binary if it still exists:

    rm -f $(which astra)
  4. Optional: Manually remove any references to the astra command from your shell profile. For example, from ~/.zprofile or ~/.bash_profile.

Select one of the following methods to uninstall the Astra CLI on Windows:

  • astra nuke command

  • Manual removal

  1. Run the astra nuke command:

    astra nuke
    Result
         _____            __
        /  _  \   _______/  |_____________
       /  /_\  \ /  ___/\   __\_  __ \__  \
      /    |    \\___ \  |  |  |  | \ //__ \_
      \____|__  /____  > |__|  |__|  (____  /
              \/     \/                   \/
    
                           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
  2. 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)
  3. Select whether to delete the .astrarc file.

    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
  4. Optional: Manually remove astra from your system PATH. For more information, see the Microsoft PowerShell documentation.

  1. Optional: If you don’t want to preserve your configuration profiles, delete the .astrarc file:

    rm -f $(astra config path -p)
  2. Delete the Astra CLI home directory:

    rm -r -f $(astra config home path -p)
  3. Delete the astra binary if it still exists:

    rm -f (Get-Command astra).Source
  4. Optional: Manually remove astra from your system PATH. For more information, see the Microsoft PowerShell documentation.

  1. Delete the Astra CLI home directory (~/.astra) and optionally its configuration file (~/.astrarc):

    1. Run the astra nuke command:

      astra nuke
      Result
           _____            __
          /  _  \   _______/  |_____________
         /  /_\  \ /  ___/\   __\_  __ \__  \
        /    |    \\___ \  |  |  |  | \ //__ \_
        \____|__  /____  > |__|  |__|  (____  /
                \/     \/                   \/
      
                             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
    2. 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)
    3. Select whether to delete the .astrarc file.

      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.
  2. Uninstall the Astra CLI using Homebrew:

    brew uninstall datastax/astra-cli/astra

Was this helpful?

Give Feedback

How can we improve the documentation?

© Copyright IBM Corporation 2025 | Privacy policy | Terms of use Manage Privacy Choices

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: Contact IBM