The Recycle Bin is Salesforce’s soft-delete area. When a user deletes a record from a list view, related list, or record page, the row isn’t physically removed — it’s marked deleted and parked in the Recycle Bin for 15 days. During that window an admin or the original deleter can restore it. After 15 days (or when the bin hits its size limit) the platform hard-deletes the row and recovery is no longer possible from the UI.
The two bins
There are actually two Recycle Bins, with different scopes:
| Bin | Who sees what | How to access |
|---|---|---|
| My Recycle Bin | Records the running user deleted | App Launcher → Recycle Bin (default view) |
| Org Recycle Bin | Every soft-deleted record across the org | App Launcher → Recycle Bin → change scope to “Org Recycle Bin”; admin-only |
Only users with Modify All Data (typically System Administrator) can see the Org Recycle Bin.
Capacity
The Recycle Bin holds up to 25× the org’s storage allocation, measured in records. For example, an org with 1,000 MB of data storage gets a bin sized for ~25 × 1,000 ÷ 2 KB ≈ 12.5 million records.
When the bin fills, Salesforce automatically purges the oldest records first to make room, even if they’re under 15 days old. So a busy org with frequent deletes can lose recovery before the 15-day clock runs out.
Restoring a record
From the Recycle Bin page:
- Select the records (or use the search bar to find them).
- Click Restore.
- Salesforce re-instates the record and most of its relationships — but there are caveats (see below).
What’s not in the Recycle Bin
A handful of objects bypass it entirely — deletes are permanent on the first action:
- Setup objects — user records, profiles, permission sets, custom objects deleted from Setup
- Big Objects — no soft-delete concept
- External Objects — they live in an external system
- Tasks and Events older than the retention period depending on settings
- Records hard-deleted via
Database.emptyRecycleBin()or the Bulk API “hard delete” option (requires the “Bulk API Hard Delete” user permission)
Relationships after restore
Restoration is usually clean, but watch for:
- Lookup relationships — restored, if the referenced record still exists.
- Master-detail children — when a parent is restored, children that were cascade-deleted can be restored along with the parent only if they’re still in the bin.
- Junction objects — both lookups must still point to live records.
- Field history —
*__Historyrecords are preserved through the cycle.
Querying deleted records with SOQL
Standard SOQL hides deleted rows. Two helpers expose them:
// Records still in the Recycle Bin (and live records)
List<Account> all = [SELECT Id, Name, IsDeleted FROM Account ALL ROWS];
// Only soft-deleted records
List<Account> trashed = [SELECT Id, Name FROM Account WHERE IsDeleted = true ALL ROWS];
ALL ROWS is required — without it, deleted records are silently filtered out.
You can also empty the bin programmatically:
Database.emptyRecycleBin(trashed); // hard-delete them now
What interviewers are really looking for
The basic answer is “15-day soft-delete bin.” The complete answer mentions: (1) two scopes — My vs Org Recycle Bin, (2) the 25× storage capacity rule, (3) objects that don’t participate (setup, Big Objects, hard-deleted via Bulk API), (4) the ALL ROWS keyword to query deleted records in SOQL, and (5) Database.emptyRecycleBin() for programmatic hard-delete.
Verified against: Salesforce Help — Manage the Recycle Bin, SOQL
ALL ROWS. Last reviewed 2026-05-17.