Skip to content

Deleting Entities

Deleting entities removes them permanently from your Legend instance. Before deleting, understand what happens to relationships and consider whether deactivation might be a better choice.

Delete an entity when:

  • The entity no longer exists (service decommissioned, person left the company, team dissolved)
  • The entity was created by mistake
  • The entity is a duplicate of another entity

Consider deactivation instead: If an entity is temporarily inactive but might be needed later, consider deactivating it rather than deleting it. Deactivated entities are hidden from the dashboard but preserved in the data directory. See Editing Entities for details on setting the active field.

Method 1: From the Detail Drawer

  1. Click the entity card on the dashboard to open the detail drawer
  2. Click the Delete button in the top-right corner of the drawer
  3. A confirmation dialog appears
  4. Click Delete to confirm

Method 2: From the Entity Card Menu

  1. Hover over the entity card on the dashboard
  2. Click the three-dot menu icon in the top-right corner
  3. Select Delete from the menu
  4. A confirmation dialog appears
  5. Click Delete to confirm

Both methods require confirmation to prevent accidental deletion.

When you delete an entity, Legend performs the following actions:

The entity is removed:

  • The entity’s YAML file is deleted from the data directory
  • The entity’s documentation directory is deleted (if it exists)
  • The entity no longer appears on the dashboard or in search results

Relationships are cleaned up:

  • All relationships referencing the deleted entity are removed from other entities
  • If a landmark depends on the deleted entity, that dependency is removed
  • If a person belongs to the deleted team, that membership is removed
  • If the deleted entity owned landmarks, those landmarks lose their owner

The audit log records the deletion:

  • The deletion is logged with the entity name, type, and who performed the deletion
  • This provides a record of what was deleted and when

Deleting an entity affects other entities that reference it. Here’s what happens in specific scenarios:

Deleting a landmark that other landmarks depend on:

  • The dependent landmarks lose their “depends on” relationship to the deleted landmark
  • The dependent landmarks are not deleted; only the relationship is removed
  • The topology graph updates to reflect the removed dependency

Deleting a team that owns landmarks:

  • The owned landmarks lose their owner
  • The landmarks are not deleted; they become unowned
  • You can assign a new owner by editing each landmark

Deleting a team that has members:

  • The people who belonged to the team lose that team membership
  • The people are not deleted; only the membership is removed
  • If a person belonged to multiple teams, only the deleted team membership is removed

Deleting a person who owns landmarks:

  • The owned landmarks lose their owner
  • The landmarks are not deleted; they become unowned

Deleting a person who belongs to teams:

  • The teams lose that member
  • The teams are not deleted; only the membership is removed

Who can delete an entity depends on your user role and the entity’s access control settings:

Administrators:

  • Can delete all entities regardless of access control settings

Users with Edit Groups:

  • Can delete entities where they belong to an edit group
  • Edit groups are configured in the entity’s access control settings

Regular Users:

  • Can delete entities they have access to (based on access groups)
  • Cannot delete entities with restricted edit groups they don’t belong to

If you cannot delete an entity, the Delete button will not appear. Contact your administrator to request delete permissions.

Check for dependencies first:

  • Open the topology explorer to see what depends on the entity
  • Review the Relationships tab in the detail drawer
  • If other entities depend on this one, consider whether those dependencies should be redirected before deletion

Transfer ownership before deleting:

  • If the entity owns landmarks, assign a new owner before deleting
  • This prevents landmarks from becoming unowned

Update documentation:

  • If the entity is referenced in other entities’ documentation, update those references
  • Remove or update any links to the entity in runbooks or guides

Communicate the deletion:

  • If the entity is widely used, notify affected users before deleting
  • Explain what is being deleted and what the impact will be
  • Provide alternatives if applicable

Create a backup:

  • For critical entities, create a backup before deletion
  • This allows you to restore the entity if needed
  • See Backups and Recovery for details

Legend does not currently support bulk deletion of multiple entities at once. To delete multiple entities, you must delete each one individually.

Workaround for bulk deletion: If you need to delete many entities (for example, removing all demo entities after onboarding), you can:

  1. Delete the entity directories from the data directory manually
  2. Restart the Legend container to reload the data

If you accidentally delete an entity, you have two recovery options:

Option 1: Restore from backup

  • If you have a recent backup, restore the entity’s YAML file and documentation directory
  • Restart the Legend container to reload the data
  • Relationships that were removed will not be automatically restored; you must recreate them manually

Option 2: Recreate the entity

  • Use the creation wizard to recreate the entity with the same data
  • Manually recreate any relationships that were removed
  • This is faster than restoring from backup if you remember the entity’s configuration

Before deleting, consider these alternatives:

Deactivation:

  • Set the entity’s active field to false
  • Deactivated entities are hidden from the dashboard but preserved in the data directory
  • You can reactivate the entity later by setting active to true
  • Deactivated entities do not count against license tier limits

Archiving:

  • Move the entity’s directory to an archive location outside the data directory
  • The entity is removed from Legend but preserved for reference
  • You can restore the entity by moving it back to the data directory

Renaming:

  • If the entity name is incorrect, edit it instead of deleting and recreating
  • This preserves all relationships and documentation