Guide

What to do right after you delete something by mistake

The first few minutes decide what can come back. Here’s what to do, in order, and what to avoid.

Guides · Updated · By

When you delete a file, the drive doesn’t wipe it. It marks the space as free, and the data stays there until something new is saved on top of it. So the most useful thing you can do right now is stop writing to the drive the file was on. Then try Undo, the Trash and your backups. Only after those, scan the drive.

Don’t panic, and don’t rush into “fixes.” Formatting, repairing, or copying things onto the drive can each make recovery harder.

1. Stop using the drive

What “stop” means depends on where the file was:

If a card or drive was formatted by accident, the same applies. A quick format usually leaves most of the old data in place until new files are written.

2. Try Undo, then the Trash

If you just dragged something to the Trash in Finder, choose Edit ▸ Undo (Command-Z) straight away. Undo only reverses your last action in Finder, so do it before you rename or move anything else.

If that’s gone, open the Trash in the Dock, select the file and choose File ▸ Put Back. Files deleted from a USB stick or card go to the Trash too, but only while that drive is plugged in.

Many apps keep their own deleted folder. Photos has Recently Deleted in its sidebar for 30 days. Notes has a Recently Deleted folder too. See recovering deleted photos for the Photos steps.

3. Check your backups and iCloud

Time Machine. Open the folder the file was in, then choose Enter Time Machine from the Time Machine menu in the menu bar. Pick a time when the file was there and click Restore. If Time Machine is set up, it also keeps hourly local snapshots of your Mac’s disk for about 24 hours, even when the backup disk isn’t connected, so a file deleted today may still be there.

iCloud Drive. If the file was in iCloud Drive (or in Desktop and Documents, if you sync them), look in iCloud.com ▸ Drive ▸ Recently Deleted. Items stay there for 30 days.

Other copies. Think about where else the file went: an email attachment, a message, a shared folder, a USB stick you copied it to once, or the camera’s companion app.

4. Scan the drive, saving to a different one

If there’s no copy anywhere, a recovery app has to find the file’s data on the drive itself. Reco is free in full, with no limit on files or size. The rules that keep this safe apply to any app:

  1. Install the app on a different drive from the one you lost files on. For an SD card or USB stick, your Mac is fine.
  2. Scan the drive. Reco opens it read-only and never writes to, repairs or formats it.
  3. Save what you recover to a different drive. Reco won’t save onto the drive it’s reading unless you confirm a clear warning first.

If the files were on your Mac’s own disk, even installing an app writes to that disk, so use the Mac as little as possible until you’ve scanned. Be realistic, too: the built-in SSD uses TRIM, which usually erases deleted data within minutes, so recovery from it is unlikely. For step-by-step scanning, see how to recover deleted files on a Mac.

What not to do

What your chances look like

Where the file wasChancesWhy
SD card, camera card, USB stickGoodThey don’t erase deleted data on their own. It stays until new files are written.
External hard driveGoodSpinning disks keep deleted data until it’s overwritten.
External SSDVariesDepends on whether macOS sends TRIM to it.
Mac’s built-in SSDLowTRIM usually erases deleted data within minutes. See why SSD recovery is hard.

No app can bring back data that’s been overwritten, or space an SSD has already trimmed. If macOS can’t see the drive at all, not even in Disk Utility, no software can read it, and a data recovery lab is the next step.

So it doesn’t happen again

Questions

Should I turn off my Mac after deleting files by mistake?

If the files were on an SD card, USB stick or external drive, eject it and unplug it instead; your Mac can stay on. If they were on the Mac’s own disk, stop saving, downloading and installing things. Turning it off won’t help much: on the built-in SSD, TRIM has usually erased the deleted data within minutes.

Can I undo emptying the Trash on a Mac?

No. There’s no Undo for Empty Trash. Your options are a backup (Time Machine, iCloud, another copy) or a recovery app that scans the drive for the deleted data.

How long do deleted files stay recoverable?

Until something new is written over them. On SD cards, USB sticks and hard drives that can be weeks if the drive isn’t used. On a Mac’s built-in SSD, TRIM usually erases the space within minutes.

Is it safe to install a recovery app after deleting files?

Yes, as long as you install it on a different drive from the one you lost files on, and save recovered files to a different drive too. If the files were on your Mac’s own disk, use the Mac as little as possible until you’ve scanned.