Thanks to visit codestin.com
Credit goes to docs.nocobase.com

nb env remove

Remove a configured env. For local/docker envs, this command first stops the CLI-managed application runtime and built-in database runtime on the current machine, then removes the saved CLI env configuration. For http/ssh envs, this command only removes the saved CLI env configuration.

If the removed env is the current env, the CLI automatically selects a new current env from the remaining envs; if no envs are available, the current env is cleared.

By default, the command requires confirmation. In non-interactive mode, you must explicitly pass --force to execute it.

To clean up CLI-managed resources on the current machine as thoroughly as possible, pass --purge. For local/docker envs, --purge also cleans up managed runtime resources, storage data, and downloaded local app files when applicable; for http/ssh envs, --purge does not affect external services and only removes the saved CLI env configuration.

Usage

nb env remove <name> [flags]

Parameters

ParameterTypeDescription
<name>stringName of the configured environment to remove
--force, -fbooleanSkip confirmation for the current remove mode; required in non-interactive mode
--purgebooleanAdditionally clean up CLI-managed resources, storage data, and downloaded local app files on the current machine when applicable; for remote API envs, only the saved env configuration is removed
--verbosebooleanShow detailed progress

Examples

nb env remove staging
nb env remove staging --force
nb env remove staging --purge --force