entity:delete¶
Delete content entities.
To delete configuration entities, see config:delete command.
Examples¶
drush entity:delete node --bundle=article
. Delete all article entities.drush entity:delete shortcut
. Delete all shortcut entities.drush entity:delete node 22,24
. Delete nodes 22 and 24.drush entity:delete user
. Delete all users except uid=1.drush entity:delete node --exclude=9,14,81
. Delete all nodes except node 9, 14 and 81.drush entity:delete node --chunks=5
. Delete all node entities in groups of 5.drush entity:delete node --limit=500
. Delete 500 node entities.
Arguments¶
- entity_type. An entity machine name.
- [ids]. A comma delimited list of Ids.
Options¶
- --bundle=BUNDLE. Restrict deletion to the specified bundle. Ignored when ids is specified.
- --exclude=EXCLUDE. Exclude certain entities from deletion. Ignored when ids is specified.
- --chunks[=CHUNKS]. Specify how many entities will be deleted in the same step. [default: 50]
- --limit[=LIMIT]. Limit on the number of entities to delete.
Global Options¶
- -v|vv|vvv, --verbose. Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
- -y, --yes. Auto-accept the default for all user prompts. Equivalent to --no-interaction.
- -l, --uri=URI. A base URL for building links and selecting a multi-site. Defaults to https://default.
- To see all global options, run
drush topic
and pick the first choice.
Aliases¶
- edel
- entity-delete
Legend
- An argument or option with square brackets is optional.
- Any default value is listed at end of arg/option description.
- An ellipsis indicates that an argument accepts multiple values separated by a space.