# Soft Delete

*noun*

say it: **“SAWFT dih-LEET”** **/ˈsɔft dɪˈlit/**

Marking a record as deleted, such as with a flag, instead of removing it, so it can be hidden and later brought back.

## What is a **soft delete**?

A **soft delete** marks a document as removed, such as with `archived: true`, instead of deleting it. Queries leave archived documents out, and setting the flag back brings the document back.

```javascript
db.recipes.updateOne({ _id: 7 }, { $set: { archived: true } });
db.recipes.find({ archived: { $ne: true } });   // every recipe still shown
```

## In a sentence

- “Because removing a recipe is a **soft delete**, a cook who regrets it can restore it from the trash page.”
- “A **soft delete** keeps old orders around for the yearly report even after customers remove them.”

Level: Journeyman · [More MongoDB terms at this level](https://www.ask-codey.com/glossary?category=mongodb&level=3)

Updated: November 19, 2026

Source: https://www.ask-codey.com/glossary/soft-delete
