Microsoft Outlook is one of the most widely used email clients, but sometimes users encounter issues when trying to delete an Outlook data file. This is especially common when the data file in question is the default file used by Outlook, which cannot be removed directly through the application. If you’re struggling with this issue, don’t worry—there are several effective methods to resolve it.
Why Can’t You Delete the Outlook Data File?
Outlook data files, particularly the default data file (PST or OST), cannot be deleted while they are still in use. The main reasons for this include:
- The data file is set as the default for sending/receiving emails.
- The data file is associated with an active mail account.
- The file is currently used by Outlook or another program running in the background.
To resolve this issue, you need to make sure the data file is no longer in use before attempting to delete it. Below are several methods to help you get rid of the Outlook data file.
Methods to Fix the Issue
1. Change the Default Data File
The primary reason you can’t delete a data file is that it’s set as the default in Outlook. To change it:
- Close Outlook.
- Open Control Panel and navigate to Mail (or Mail (Microsoft Outlook)).
- Click on Data Files.
- Select another data file and click Set as Default.
- Restart Outlook and try removing the file again.
After setting another data file as default, you should be able to delete the previous one without any issues.
2. Remove the Email Account Associated with the Data File
If a data file is linked to an active email account, Outlook will require it to function properly. You need to remove the associated email account before deleting the file:
- Open Control Panel and go to Mail.
- Click on Email Accounts.
- Select the email account using the data file and click Remove.
- After removing the account, go back to Data Files and see if the file can now be deleted.
Be cautious when removing an email account, as it can delete local data, especially if cached data is not backed up.
3. Delete the Data File from Its Location
If Outlook does not allow you to remove the data file from within its interface, you can try deleting it directly from your computer.
- Close Outlook to ensure the file is not in use.
- Open File Explorer and navigate to the default location of Outlook data files:
- For PST files:
C:\Users\YourUsername\Documents\Outlook Files
- For OST files:
C:\Users\YourUsername\AppData\Local\Microsoft\Outlook
- For PST files:
- Locate the data file you want to delete and try removing it.
If you cannot delete the file because it is “in use,” restart your computer and try again.

4. Use the Registry Editor (Advanced Users Only)
If none of the above methods work, you may need to modify the Windows registry. Be extremely careful when making changes to the registry, as incorrect modifications can cause system issues.
- Press Windows + R, type
regedit
, and press Enter. - Navigate to the following location:
HKEY_CURRENT_USER\Software\Microsoft\Office\XX.0\Outlook\Profiles\Outlook
(Replace
XX.0
with your Outlook version number, such as 16.0 for Outlook 2016.) - Look for the profile key related to the data file.
- Right-click and Delete the entry.
- Close the Registry Editor and restart your computer.
After making these changes, go back and attempt to remove the data file again.
5. Run Outlook in Safe Mode
Sometimes, third-party plugins or background processes interfere with the deletion process. Running Outlook in Safe Mode can help:
- Press Windows + R, type
outlook.exe /safe
, and press Enter. - Try removing the data file in this mode.
If this works, then a plugin might be preventing you from deleting the file in normal mode. You may need to disable unnecessary add-ins.

Final Thoughts
Being unable to delete an Outlook data file can be frustrating, especially if it’s preventing Outlook from functioning optimally. By following the methods outlined above—changing the default data file, removing linked email accounts, deleting manually, modifying the registry, or running Outlook in Safe Mode—you should be able to resolve the issue successfully.
If you continue to face issues, consider using the Microsoft Support and Recovery Assistant for Outlook, which can help diagnose and fix Outlook-related problems automatically.