Blog

How to delete files on a Mac (and the ones that won't go)

Delete files on a Mac with Command-Delete, skip the Trash with Option, get files back with Put Back, and fix the ones that refuse to be deleted.

Select the files in Finder and press ⌘⌫ (Command-Delete). They go to the Trash. To free the space, empty the Trash: Control-click it in the Dock and choose Empty Trash, or press ⇧⌘⌫ in Finder. To skip the Trash, press ⌥⌘⌫ instead: the file is deleted at once, after a confirmation.

Every way to delete a file

Method Where it goes Can you get it back?
⌘⌫, or drag to the Trash Trash yes, with Put Back
Control-click > Move to Trash Trash yes
⌥⌘⌫, or Option + File > Delete Immediately deleted no, only from a backup
Empty Trash (⇧⌘⌫) deleted no, only from a backup
Terminal: rm file.pdf deleted no, and no confirmation

The Terminal route is the one to avoid unless you know exactly what you typed: rm never asks, and never uses the Trash.

Free toolWhat's in your Downloads folder?See its files by type, size and age in your browser. Nothing is uploaded.

Select many files at once

  • All files in a folder: ⌘A.
  • A range: click the first file, then Shift-click the last (in list view).
  • Several separate files: Command-click each one.
  • All files of one kind: choose View > Use Groups, group by Kind, and select a whole group: every DMG installer, every ZIP, every screenshot.

The last one is the fastest way to clean a messy folder: installers and archives are usually safe to delete once you’ve used them, and they are grouped together.

Empty the Trash automatically

Open Finder, choose Finder > Settings > Advanced, and turn on Remove items from the Trash after 30 days. Deleted files then stay recoverable for a month, and the Trash never grows forever.

Files that won’t delete

  1. “The operation can’t be completed because the item is in use.” An app has the file open. Quit that app. If you don’t know which one, restart the Mac.
  2. The file is locked. Select it, press ⌘I and uncheck Locked.
  3. “You don’t have permission.” Press ⌘I, open Sharing & Permissions at the bottom, click the lock, and give yourself Read & Write. On an external drive formatted for Windows (NTFS), macOS can read but not delete: reformat the drive or use a tool that writes NTFS.
  4. An app that won’t leave the Trash. Quit the app first; for an app that runs in the menu bar, quit it from its menu bar icon.

System files in /System are protected by macOS and can’t be deleted, even as an administrator. That is on purpose.

Get a deleted file back

  • Still in the Trash: open the Trash, Control-click the file, choose Put Back. It returns to its original folder.
  • Trash emptied: restore it from Time Machine (open the folder it was in, then Time Machine from the menu bar), or from iCloud Drive > Recently Deleted if it was in iCloud Drive (kept 30 days).

Where the manual method stops

Deleting takes one keystroke. Deciding what to delete takes the time: in a Downloads folder or a Desktop of hundreds of files, the installers, PDFs, screenshots and archives are mixed together, and you check them one by one.

Sort first, then delete

DeclutrDeclutr sorts the Desktop, Downloads or any folder into category folders by file type: Documents, Images, Videos, Audio, Archives, Apps, Code & Scripts, 3D Models and more. After one click, the installers (.dmg, .pkg) and the ZIPs sit together in Archives, ready to review and trash in one move. It never deletes a file itself, and one Undo button puts every file back where it was.

The sort is free. Pro, a one-time $8.99 purchase in the US, adds rules by name, extension, age or size, such as “installers older than 30 days go to a folder to review”, and runs them on a watched folder or on a schedule. It needs macOS 13 Ventura or later.

Related: how to delete downloads on a Mac and how to free up disk space on a Mac.

Questions people ask

How do I delete files on a Mac?

Select the files in Finder and press Command-Delete to move them to the Trash. Then Control-click the Trash in the Dock and choose Empty Trash, or press Shift-Command-Delete in Finder. The space on your disk comes back only once the Trash is empty.

How do I delete a file permanently on a Mac without the Trash?

Select the file and press Option-Command-Delete, or hold Option and choose File > Delete Immediately. macOS asks for confirmation, and the file cannot be restored from the Trash afterwards.

Why can't I delete a file on my Mac?

The file is open in an app, it is locked, or you don't have permission. Quit the app that uses it, uncheck Locked in Get Info (Command-I), or check Sharing & Permissions at the bottom of the Info window. For a file in use by a background process, restarting the Mac releases it.

How do I get back a file I deleted on a Mac?

If the Trash is not empty yet, open it, Control-click the file and choose Put Back: it returns to the folder it came from. After the Trash is emptied, only a backup can bring it back, such as Time Machine or the Recently Deleted folder on iCloud Drive (kept 30 days).