Skip to main content

Delete

expanso-cli profile delete

Delete a profile

Synopsis

Delete a connection profile.

What Gets Deleted:

Permanently removes the profile configuration file from: ~/.expanso/cli-client/profiles/PROFILE_NAME.yaml

This includes all settings: endpoint URL, authentication credentials, TLS configuration, and metadata.

When To Delete:

• Decommissioned environment no longer exists • Credentials have been rotated and profile needs to be recreated • Cleaning up old test/temporary profiles • Removing profiles for environments you no longer access

Safety Checks:

• Asks for confirmation before deleting (unless --force is used) • Warns if you're deleting the currently selected profile • After deleting current profile, you'll need to select another

Recovering:

Profile deletion is permanent. If you might need the profile again, consider using 'profile show' to export it before deleting: expanso-cli profile show old-env > backup.json

expanso-cli profile delete PROFILE_NAME [flags]

Examples

  # Delete a profile (asks for confirmation)
expanso-cli profile delete old-staging

# Delete without confirmation
expanso-cli profile delete temp-test --force

# Backup before deleting
expanso-cli profile show old-env > old-env-backup.json
expanso-cli profile delete old-env

Options

  -f, --force   Force deletion without confirmation
-h, --help help for delete

Options inherited from parent commands

      --auth-token string   API bearer authentication token
-e, --endpoint string API endpoint URL
-k, --insecure Skip TLS certificate verification
-p, --profile string Profile to use for configuration
--timeout string Request timeout duration
-v, --verbose Enable verbose logging

SEE ALSO

Auto generated by spf13/cobra on 19-Nov-2025