Glint › Guides

Guide

How to recover deleted files from an SD card or USB stick on a Mac

Last updated

Deleted the wrong folder from your camera's SD card, or formatted a USB stick too quickly? On FAT32 and exFAT cards the data is usually still there until something new is written over it. What you do in the next few minutes matters most.

Stop using the card right now

When a file is deleted on FAT32 or exFAT, the file system only marks its directory entry and clusters as free. The photo itself stays on the card until a new file reuses that space. So:

Step 1: check the Trash first

If you deleted the files in Finder, they may still be in the Trash. macOS keeps a removable disk's deleted items in a hidden .Trashes folder on that disk, and shows them in the Trash only while the card is connected. Insert the card, open the Trash, and drag the files back. If you already emptied the Trash, or deleted the photos on the camera itself, continue.

Step 2: identify the card

Insert the card and open Terminal:

diskutil list external

Find your card by its size and name, for example /dev/disk4 with a partition disk4s1 of type Windows_FAT_32 or ExFAT. Double‑check the disk number. Every command below acts on whatever disk you name, and picking the wrong one can damage another drive.

Step 3 (recommended): make a disk image

Working on a copy protects the card from further damage and lets you try several tools. Unmount the card (don't eject it) and copy it byte by byte to your Mac:

diskutil unmountDisk /dev/disk4
sudo dd if=/dev/rdisk4 of=$HOME/sdcard.img bs=4m

rdisk (the raw device) is much faster than disk. The image is as large as the card, so a 64 GB card needs 64 GB free on the Mac. Press Ctrl+T in Terminal to see progress. Terminal may need Full Disk Access or removable volume access to read the device.

Get if= and of= right. if is the source (the card), of is the destination file. Swapping them overwrites the card.

Step 4: scan for deleted files

macOS has no built‑in undelete, so you need a recovery tool. There are two approaches, and good tools combine them:

Reading the file system

On FAT32 and exFAT, a deleted file's directory entry often survives with its name, size and first cluster. A tool that reads those entries can restore files with their original names and folders, including types it doesn't otherwise recognise.

Signature carving

Carving ignores the file system and scans every byte for known file headers (JPEG, PNG, HEIC, MP4, MOV, PDF and so on), then cuts out each file. It works even after a quick format or on a damaged card, but recovered files get generic names, and fragmented files can come out corrupt.

Free options include:

Point the tool at the disk image you made, or at the card itself, and choose an output folder on your Mac.

Step 5: check what came back

Open the output folder and sort by kind and size. Use Quick Look (Space) to check photos and videos quickly. Expect some duplicates, thumbnails extracted from photos, and a few broken files. Once you have everything you need, copy it to a second location before you format and reuse the card.

Cameras, phones and other file systems

Doing it with Glint

Glint's File Recovery scans USB sticks, SD cards, external disks or disk images (.dmg, .img, .iso, .bin) for deleted photos, videos, audio and documents. It carves JPEG, PNG, GIF, HEIC, WebP, MP4, MOV, 3GP, AVI, M4A, WAV, PDF, Office and ZIP files by signature. When it finds a FAT or exFAT file system it also reads the directory entries, so deleted files come back with their original names, files of any type can be recovered, and files that aren't deleted are skipped.

You choose what to look for and a destination folder; Glint refuses to save onto the disk being scanned. It can unmount the card's volumes before the scan and mount them again afterwards. Reading a raw disk needs administrator rights, so macOS asks for your password, or Glint's privileged helper does it once you've approved it.

FAQ

Can I recover files deleted from my Mac's internal SSD the same way?

Usually not. macOS uses TRIM on internal SSDs, so the drive erases freed blocks soon after deletion. For internal files, check the Trash, Time Machine, iCloud Drive's Recently Deleted, or the app's own trash.

Does formatting an SD card make recovery impossible?

A quick format usually only rewrites the file system tables, so carving tools can often still find photos and videos. A full or secure erase overwrites the data, and then nothing can be recovered.

Why are some recovered photos corrupt or half grey?

Large files are sometimes stored in pieces spread across the card. Signature carving assumes a file is in one piece, so fragmented files can come back broken. Recovering early, before the card is written to again, gives the best results.

Glint is a free disk cleaner for macOS 14 Sonoma and later, on Apple Silicon and Intel. No limits, no account, and everything stays on your Mac.

Download for Mac

What Glint does · FAQ · Safe by design

Related guides