Skip to content

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 node --exclude=9,14,81. Delete all nodes except node 9, 14 and 81.
  • drush entity:delete user. Delete all users except uid=1.

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.

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.