keepcalculator

06 Numbers and Powers

Deleted Files Keep Showing Up? Fixes That Work

Card No. 06·17285 · Updated · Standard formula, shown below

If you delete a file and it reappears on its own, the cause is almost always one of three things: the file is still open in another program, it is being re-synced by a cloud service, or it is protected by system settings. This guide walks through each likely cause and the exact steps to stop deleted files from coming back on Windows and macOS.

Why Do Deleted Files Come Back?

When you delete a file, the operating system does not immediately erase the data. It marks the space as available. The file only disappears when that space is overwritten. So when a file “comes back,” it is not being recovered from the drive—it is being recreated or restored by something else. The usual suspects are:

  • Cloud sync apps (OneDrive, Google Drive, Dropbox, iCloud) that re-download the file from the server.
  • Programs holding the file open (a document in Word, a video in a media player, a database in use).
  • File history / backup tools that restore the file automatically.
  • Antivirus or ransomware protection that quarantines and then restores a file it thinks was wrongly removed.
  • Permissions issues where you lack the right to delete, so the file never actually gets removed.

Check if the File Is Still Open in Another Program

On Windows, if a file is open in any application, Windows will block the deletion and show an error like “The action can’t be completed because the file is open in another program.” But some apps silently keep handles open in the background, so the file appears to delete and then instantly reappears. On macOS, a similar thing happens with apps that have autosave or versions enabled.

How to fix:

  1. Close every application that might be using the file—not just the window, but the whole app (check the system tray on Windows, the Dock on macOS).
  2. On Windows, open Task Manager (Ctrl+Shift+Esc) and look under “Processes” for any app that could be using the file. End those processes.
  3. On macOS, open Activity Monitor and quit any app that might be using the file.
  4. Try deleting again. If it works, the file stays gone.

Cloud Sync Is the Most Common Cause

If you use OneDrive, Google Drive, Dropbox, or iCloud, your local folder is a mirror of the cloud. Deleting a file locally only removes it from that device; the cloud still has a copy. The sync client then sees the file is missing and re-downloads it, making it look like your deletion was undone. This is by design—it prevents accidental data loss.

How to actually delete a cloud-synced file:

  • Delete the file from the cloud website (e.g., drive.google.com) and then let it sync to your device.
  • Or, pause syncing temporarily, delete the file locally, then resume sync and choose “Delete everywhere” when prompted.
  • Or, move the file out of the synced folder (to your Desktop or Documents) and then delete it from the cloud.

If you are using OneDrive on Windows, right-click the file in File Explorer and select “Delete”—it should go to the Recycle Bin and sync. But if you have “Files On-Demand” enabled, the file might be a placeholder that re-downloads. Check the cloud settings and disable “Files On-Demand” if you want local-only control.

Check Recycle Bin and Trash Settings

Files you delete go to the Recycle Bin (Windows) or Trash (macOS) first. They are not truly gone until you empty it. If you are using a cloud sync app, the Recycle Bin is often synced too—so a file you delete locally might reappear from the cloud’s recycle bin.

Steps:

  1. Empty the Recycle Bin or Trash on your device.
  2. Also empty the cloud recycle bin (e.g., OneDrive’s Recycle Bin in the web interface, Google Drive’s Trash).
  3. If the file reappears after that, it is not coming from the recycle bin—it is being re-created by another process.

File History and Backup Tools Can Restore Files

Windows File History, macOS Time Machine, and third-party backup tools (like Acronis or EaseUS) can automatically restore files if they detect a change. If you have a backup tool running, it might see the deletion as an error and restore the file from the last backup.

How to check:

  • Open the backup tool and look for a “Restore” or “History” section. See if the file is listed there.
  • Temporarily pause the backup tool, delete the file, and then wait a few minutes. If the file stays gone, the backup tool was the culprit.
  • If you want to keep backups but stop this behavior, configure the tool to ignore that folder or to not auto-restore deleted files.

Antivirus and Ransomware Protection Interference

Some security programs have “ransomware protection” that blocks any change to certain folders. If you try to delete a file in a protected folder, the antivirus may silently undo the deletion to “protect” the file. This is more common with third-party antivirus suites than with Windows Defender, but Defender’s “Controlled Folder Access” can cause it too.

What to do:

  1. Open your antivirus settings and look for “Ransomware protection” or “Folder protection.”
  2. Add the folder containing the file to the allowed list, or temporarily disable the protection.
  3. Delete the file, then re-enable protection.
  4. If you are using Windows Defender, go to Windows Security → Virus & threat protection → Ransomware protection → Manage ransomware protection. Turn off Controlled folder access temporarily, or add the folder to the allowed apps.

Permissions and Ownership Issues

If you do not have write permission to the folder, your delete command might appear to succeed but actually fail silently. The file remains because the system denied the change. This often happens with files in Program Files, system folders, or folders owned by another user.

How to fix:

  • Right-click the file → Properties → Security tab. Check if your user account has “Full control.”
  • If not, click “Advanced” → “Change” owner to your account, then grant full control.
  • On macOS, right-click the file → Get Info → Sharing & Permissions. Change the privilege to “Read & Write” for your user.

Frequently Asked Questions

Why does a deleted file keep reappearing after I empty the Recycle Bin?

Emptying the Recycle Bin only clears the local trash. If the file is synced to a cloud service, the cloud still has a copy and will re-download it. You need to delete it from the cloud’s trash as well, or delete it from the cloud first.

Can a virus cause deleted files to come back?

Yes, some malware can restore files it has marked as important, or it may be re-downloading from a remote server. If you suspect malware, run a full antivirus scan. Also check for any suspicious startup programs that might be recreating the file.

Why does a file reappear after I delete it in OneDrive?

OneDrive syncs deletions across devices. If you delete a file on one device, it should be deleted everywhere. But if you have “Files On-Demand” enabled, the file might be a placeholder that is re-downloaded from the cloud. Also, if you delete a file in the OneDrive folder, it goes to the OneDrive recycle bin, which is separate from your local recycle bin. You must empty the OneDrive recycle bin online.

How do I permanently delete a file so it never comes back?

To permanently delete a file, you need to remove it from all locations: local recycle bin, cloud recycle bins, and any backup versions. Use Shift+Delete on Windows to skip the recycle bin, and then also delete it from the cloud trash. For macOS, use Option+Command+Delete. Then ensure no backup tool is set to restore it.

What if the file is not in the cloud and still reappears?

Check if any program is set to auto-save or auto-generate the file. For example, some applications create lock files or temporary files that look like your deleted file. Also check if the file is in a shared folder that another user is restoring. Finally, run a disk check to rule out file system corruption.

Is there a way to stop OneDrive from syncing a specific folder?

Yes. In OneDrive settings, go to the “Backup” or “Sync” tab, and choose “Manage backup.” You can unlink the folder, or you can right-click the folder in File Explorer, select “Free up space” to make it online-only, and then delete it from the cloud. This prevents it from re-downloading.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →