You Cannot Delete This Outlook Data File Error [Fixed 2023]

Written By Farhan Max

Are you affected by the cannot delete this data file error in Outlook? You have spent endless hours scouring the internet without any fix working for you. Do not worry; you’re in the right place.

I faced a similar error when I added a new profile to get emails from another account. When I wanted to remove the existing data file, an error said the existing file could not be

I found the solution to the error very quickly, and you can do the same. I have compiled the steps in this article in the same order I fixed my Outlook account.

Without wasting any time, let’s get started.

Check out our recent article on block a sender by email address in Outlook.

When Does Cannot Delete Outlook Data File Error Occur?

You can come across the cannot delete this data file error mainly due to Outlook running in the background. It can also happen if the OST files are used by Outlook when you attempt to delete them or if your Outlook profile becomes corrupted. A virus infection can corrupt the data file too.

Here are the reasons why you cannot delete the Outlook data file:

The OST file is being used while deleting

If the OST file is open in a program, an error will occur when we try to delete it. Outlook mainly uses this file to save your profile information. When Outlook is actively using it, you cannot change or delete it.

Outlook.exe process running in the Task Manager

If Outlook is running in the background, that means it is using the files stored in the HDD. You will receive the error message if you delete the data file during this time. You can view if the Outlook process is running in the task manager.

Another Process uses Outlook

Even if Outlook is closed, it can remain active in the background. For example, a third-party application can sync the calendar using Outlook. It will run Outlook as a background task. You will encounter the same error as you delete the data files.

The OST files get corrupted

Corrupted OST files can cause Outlook to give out an error. A virus or malware in your system can cause problems with the OST file.

If you close Outlook when updating or syncing with the exchange server, this can corrupt the OST files. Bad sectors in the HDD can also contribute to the failure of these files.

Follow our guide step-by-step to fix Outlook store button not showing.

How to Fix Cannot Delete this Outlook Data File Error

You can quickly fix this problem by closing the data files that are open in Outlook. Terminate Outlook before attempting to delete the data files. Remove the existing data files and create a new location for them.

Let’s look at how you can apply the fixes.

Here are the methods to fix cannot delete the data file error:

1. Close the Outlook data file

You cannot delete the data file if it is open in Outlook. Close the file from the menu in Outlook to proceed forward.

These are the steps to close the Data File in Outlook:

  • Click on the Start Menu and Open Outlook.
  • Right-click on the Data Files tab present on the right side of the Interface.
  • Click Close Outlook Data

It will close the Outlook Data Files that were opened in Outlook. Now you can proceed to Delete the Data files without interruption.

Here’s a complete guide on how to fix Outlook can’t create file error when opening attachment.

2. Terminate the Outlook process

You must close Outlook from the Task Manager before deleting the data files. If Outlook is open, it will try to stop the deletion process.

Here is a simple way to close Outlook from the Task Manager:

  • Right-click on the Taskbar and click Task Manager.
  • Go to the process tab.
  • Right-click on Outlook from the list of processes.
  • Click End Task.end-task-of-outlook-from-task-manager

By doing this, Outlook will close from the list of opened applications.

Go and check our other article on Outlook not working on WiFi.

3. Remove the Outlook profile from Control Panel

The existing profile of Outlook can become corrupted. You will need to remove this and add a new profile containing all your information.

Here is how you can remove your Outlook profile:

  • Press the Windows Key and search Control Panel.
  • Click to open the Control Panel.
  • Open Mail under User Accounts on the Left side of the screen.
  • Click on the profile you want to remove.
  • Click Remove and select Yes to a dialog box that asks for confirmation.

Now your Outlook profile is removed from your Computer.

Find out how to fix Outlook signature not showing images.

4. Delete the OST file manually

You can remove the Outlook profile from the Control Panel. However, you can also delete it manually. To do this, locate the AppData folder of Outlook and remove the OST file.

Here is how you can remove the OST file:

  • Navigate to C: > Users > UserName > AppData > Local > Microsoft > Outlook.
  • Right-click on the OST file and select
  • Press Yes in the dialog box that pops up.

The OST file is removed from your Computer.

Important Note: Always create a backup of the OST file. It can be restored using Outlook later on.

Follow our easy step-by-step guide to turn off Outlook’s junk email filter.

5. Delete the Mail profile file using Registry Editor

You can delete your Outlook profile from the Registry Editor too. It is a database that stores all information and app data of all the users.

To do so, navigate to the Registry key that stores the Outlook profile and delete it.

These are the steps to delete the Registry keys of your Outlook profile:

  • Press Windows + R and enter regedit in the dialog box.
  • Navigate to this key by expanding the sections in the left panel of the Registry Editor.

HKEY_CURRENT_USER > SOFTWARE > Microsoft > Windows NT CurrentVersion > Windowswindows-nt-current-version

  • Right-Click on Windows Messaging Subsystem and select delete.
  • Press Yes if a dialog box asks for confirmation.

Your Outlook profile data is deleted now.

Important to Know: Remember to back up the OST file before deleting the Registry entry. You will lose any data permanently if it is not synced up.

After applying the above fixes, you can delete the data file without errors. In case the situation persists,  look at some additional fixes I have compiled in the next section.

Check out the easiest way to enable read receipts in Outlook.

Additional Steps to Fix the Data File Error

By now, Outlook should start functioning properly. If Outlook does not work for you yet, follow these additional fixes. These fixes are common to all applications. Use them as a final resort.

Here are the Additional Steps you can use to fix the Data File Error:

Restart Computer

Often restarting the computer may resolve many issues relating to programs not working. This method removes the processes from memory and boots up the core services and drivers. Then launch Outlook and see the changes.

Repair Outlook

The core files and configurations of Outlook can become messed up. It can break the usual operation of Outlook.

To fix this, run the Office repair tool. It will reinstall every Office component and bring the applications to the stock settings.

Here are the steps to reinstall Office:

  • Right-Click on the Start Menu and select Apps and Features.
  • Click Modify after selecting Microsoft Outlook.
  • Click Quick Repair.quick-repair-office

The Repairing will start and fix the Office installation files.

Here’s a complete guide on disable Outlook deleting confirmation message.

Frequently Asked Questions(FAQs)

How do I close the Data files in Outlook?

 You can easily close the data files in Outlook. To do this, navigate to Outlook > Right Click on Data Files > Close Outlook Data Files > Ok.

How Can I Delete the Data Files in Outlook?

The data files are located in the AppData folder under the current user. To delete the data files, go to C: > users > AppData > UserNameLocal > Microsoft > Outlook > Delete OST files.

How can I repair the OST file?         

Microsoft Office includes a PST repair tool. Insert the location of the data file to start the repair. To run the repair tool, go to C: > Program Files > Microsoft Office > root > Office 16 > SCANPST.exe

Closing Thoughts

Outlook is no different than other applications when it comes to errors. And it can be very annoying at times.

In this article, I have stated why Outlook can give errors in its data files. You can solve this with significantly less effort. The solutions stated above will help you do that.

If you have questions, comment below on the post. Don’t forget to tell us which step fixed your error.

Till then, it’s Goodbye.

About The Author
Farhan Max is a tech geek with a particular interest in computer hardware. He's been fascinated by gaming since childhood and is now completing his undergraduate studies while researching and testing the latest tech innovations. Alongside his love for all things geeky, Farhan is also a skilled photographer.

Leave a Comment