cwp db rm
shipped 1.0.0cwp db rm <name> [flags]
Local only: it acts on no environment.
| Argument | What it is | Default |
|---|---|---|
<name> | snapshot to remove |
| Flag | What it does | Default |
|---|---|---|
--with-agent | with —dry-run on a host with no shell: install and remove the PHP agent so the plan is real | off |
Plus the shared flags --json, -v, --verbose, -q, --quiet and --dry-run.
What it does
cwp db rm removes one snapshot, by name.
cwp refuses an unknown name, and the refusal lists the snapshots that do exist. A typo costs a second rather than a wrong deletion.
Example
cwp db rm before-migration
What it does not do
It never deletes anything you did not name. ddev snapshot --cleanup on
its own removes every snapshot of the project. So cwp always passes the name
through to DDEV. This command exists for that one reason, rather than as a
documented DDEV incantation.
Uploads are not involved; a snapshot is the database.