We’ll show you how to prevent your antivirus from deleting files automatically without your approval. This tutorial will cover steps for Windows Defender and popular third-party antivirus software—Avast, AVG, BitDefender, etc. Before you proceed, confirm that the file(s) is safe and won’t damage your PC and data before exempting it from antivirus scans. Excluding a (harmful) file from being deleted may increase your PC’s vulnerability to malware attacks and other threats. Note: The troubleshooting steps in this tutorial are applicable to Windows 10, Windows 11, and Mac or (macOS) devices.

Prevent Avast Antivirus from Deleting Files

Follow the steps below to stop Avast from deleting a file, folder, or app when scanning your PC for threats. That’ll prevent Avast from deleting the selected file(s) during all security scans. Avast also lets you exclude items from a specific type of scan. See the next step for detailed instruction. After this, Avast will skip the file(s) during the selected security scans. Avast will also list all exempted items in the “File or Folder” section. To delete an exclusion, hover your cursor on the item and select the Bin icon. Otherwise, select the Pen icon to edit the exclusion.

Prevent AVG from Deleting Files

AVG is also an Avast-owned security software. The process for preventing AVG from automatically deleting files is similar to Avast’s. To remove a file from the exception list, hover your cursor on the item in the “File or Folder” section, and select the Bin icon.

Prevent BitDefender from Deleting Files

If BitDefender is the default antivirus solution on your computer, here’s how to prevent the app from deleting a file when scanning for threats. Head to the “All exceptions” tab to preview the exempted files. Select the Bin icon to delete a file or select the Pen icon to modify the exception options.

Prevent Windows Defender from Deleting Files

Windows Defender also lets you exclude items—files, file types, processes, folders, etc.—from security checks. In this section, we’ll show you how to configure the Windows Security settings so that your PC won’t automatically delete files it suspects to be malicious. For Windows 10, head to Settings > Update & Security and select Windows Security. Note: You can enter the file extension with or without the preceding period (.). Say you want to stop Windows Security from flagging or deleting DLL files, you can enter the file type/extension as dll or .dll. For executable files (or exe files), type exe or .exe into the dialog box. Quick Tip: Launch Task Manager and go to the Details tab to view a list of all processes running on your Windows computer. Check the “Name” column for the name of each process. When you exclude a process in the Windows Security settings, files opened by that particular process will also be excluded during real-time protection. However, the process’ files won’t be exempted during on-demand and scheduled scans. You’ll find excluded files, folders, file types, processes, and other items in the Windows Security Exclusions page—right below the “Add an exclusion” button. To remove an item from the list, select the file/file type/process, and select Remove. You should disable Windows Defender and use third-party antivirus programs if Windows Security keeps deleting your files.

One More Thing: Disable Storage Sense in Windows

Storage Sense isn’t an antivirus. It’s a feature in Windows that frees up disk space by automatically deleting files you haven’t used in the last 30 days. If your PC often deletes files, and your antivirus program isn’t the culprit, consider disabling Storage Sense. Note: Storage Sense doesn’t delete items in the Downloads folder or items saved by cloud storage services like OneDrive. Go to Settings > System > Storage and toggle off Storage Sense in the “Storage management” section. There are hundreds of antivirus software out there. If you don’t use any of the apps mentioned above, contact the developer or check the developer’s website to learn how to prevent that antivirus from deleting files when scanning for malware. Losing important files can be terrible. If your antivirus deleted a file you haven’t added to its exception list, you can always get back the file using data recovery software.

How to Prevent Your Antivirus Program From Deleting Files - 16How to Prevent Your Antivirus Program From Deleting Files - 53How to Prevent Your Antivirus Program From Deleting Files - 13How to Prevent Your Antivirus Program From Deleting Files - 65How to Prevent Your Antivirus Program From Deleting Files - 9How to Prevent Your Antivirus Program From Deleting Files - 5How to Prevent Your Antivirus Program From Deleting Files - 24How to Prevent Your Antivirus Program From Deleting Files - 41