Skip to content

cwp db rm

shipped 1.0.0
cwp db rm <name> [flags]

Local only: it acts on no environment.

ArgumentWhat it isDefault
<name>snapshot to remove
FlagWhat it doesDefault
--with-agentwith —dry-run on a host with no shell: install and remove the PHP agent so the plan is realoff

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.