OneDrive File Issues

How to Delete Old OneDrive for Business Files After Leaving a Company

Jason MillerJason Miller Nov 2, 2026 868 views

Question details

The user needs to remove residual OneDrive for Business files from their local computer after their enterprise account was deactivated.

How to Delete Old OneDrive for Business Files After Leaving a Company
Product
OneDrive for Business
Device & OS
not provided
Scenario
Leaving a company and needing to clean up the local machine from enterprise synchronized files without access to the business account.
Observed behavior
Files from the former employer's OneDrive library remain locally and cannot be deleted normally because the business account was removed.
Before you start

Before deleting any folders, verify if there are any personal files accidentally saved in the business folder that you need to back up to a local drive. Ensure you no longer need access to the enterprise data, as removing the sync folder is permanent locally.

Solution 1Recommended

Unlink the Business Account and Remove the Sync Folder

Unlinking the account stops the synchronization process, allowing you to manually delete the leftover local files without encountering permissions or sync errors.

If your computer is still trying to sync files with a deactivated enterprise account, Windows may lock the files and prevent deletion. Stopping the sync process from within OneDrive settings resolves this file-lock issue.

1
Open OneDrive Settings

Click the OneDrive cloud icon in your system tray (Windows taskbar or Mac menu bar), click the gear icon (Help & Settings), and select Settings.

2
Unlink the Account

Navigate to the Account tab and click 'Unlink this PC' next to the former employer's business account. Confirm the action when prompted to stop all syncing activities.

3
Locate the Sync Folder

Open File Explorer (Windows) or Finder (Mac) and navigate to your user profile folder (e.g., C:\Users\YourUsername). Find the folder named 'OneDrive - [Company Name]'.

4
Delete the Leftover Files

Select the entire business OneDrive folder and press the Delete key to remove the leftover local files permanently.

Unlink the Business Account and Remove the Sync Folder
Administrator Access Required for Cloud Recovery: If you need copies of enterprise files but your account is already deactivated, you must contact your former organization's IT administrator to retrieve them.
Free Microsoft Office alternative

Manage Your Local Documents Seamlessly with WPS Office

If you're transitioning away from enterprise Microsoft 365 accounts, WPS Office offers a powerful, lightweight, and free alternative to manage your personal and professional documents without complex cloud synchronization restrictions.

  1. 1. Download and Install: Get the free WPS Office installer from the official website and complete the quick installation process.
  2. 2. Open Your Local Files: Launch WPS Office and directly open your local documents, spreadsheets, and presentations without needing to sign into an enterprise cloud.
  3. 3. Save and Organize: Save your edited files directly to your local hard drive or a personal cloud storage solution of your choice.
Highly compatible with Microsoft Office formats like DOCX, XLSX, and PPTX.Lightweight installation with a familiar, easy-to-use tabbed interface.No mandatory cloud accounts required; edit local files securely and privately.Built-in PDF editing capabilities at no extra cost.
microsoft office alternative - wps office

Frequently Asked Questions

Why do I get an error saying the file is open in another program when deleting OneDrive files?

This happens because the background OneDrive sync process or Windows Explorer is still trying to access the file. Unlinking your OneDrive account first or closing OneDrive completely from the system tray usually resolves this file-lock issue.

Will deleting these local files delete them from the company's server?

No. If your account has already been deactivated or if you successfully clicked 'Unlink this PC', deleting the local folder will not affect the original files stored on the company's Microsoft 365 servers.

How do I recover a personal file I accidentally saved in my old work OneDrive?

If the local file was already deleted, check your local Recycle Bin. If it was only stored on the cloud and your business account is deactivated, you must contact your former employer's IT department to request a data export.

Can I keep the OneDrive application but remove the business account?

Yes, unlinking the business account from OneDrive Settings removes the enterprise sync connection but leaves the OneDrive application installed, allowing you to sign in and sync a personal Microsoft account instead.