How to Prevent Your Antivirus Program From Deleting Files

Covers steps in Windows Defender and other popular apps

Many antivirus software programs automatically delete suspicious files during security scans. Although these antivirus tools let you restore deleted files, they’ll most likely delete the file again during subsequent scans. To prevent a recurrence, it’s best to configure your antivirus to exempt important files when scanning for viruses and malware.

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 stopAvastfrom 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 theBinicon. Otherwise, select thePen iconto 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 theBinicon.

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 theBin iconto delete a file or select thePen iconto 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 toSettings>Update & Securityand selectWindows 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 asdllor.dll. Forexecutable files(or exe files), typeexeor.exeinto the dialog box.

Quick Tip:Launch Task Managerand go to theDetailstab 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 selectRemove.

You shoulddisable Windows Defenderand 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 thatfrees up disk spaceby 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 toSettings>System>Storageand toggle offStorage Sensein 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 usingdata recovery software.

Sodiq has written thousands of tutorials, guides, and explainers over the past 4 years to help people solve problems with Android, iOS, Mac, and Windows devices. He also enjoys reviewing consumer tech products (smartphones, smart home devices, accessories, etc.) and binge-watching comedy series in his spare time.Read Sodiq’s Full Bio

Leave a Reply

Your email address will not be published.Required fields are marked*

Comment*

Name*

Email*

Website

Welcome to Help Desk Geek- a blog full of tech tips from trusted tech experts. We have thousands of articles and guides to help you troubleshoot any issue. Our articles have been read over 150 million times since we launched in 2008.

HomeAbout UsEditorial StandardsContact UsTerms of Use

Copyright © 2008-2024 Help Desk Geek.com, LLC All Rights Reserved