Forum Discussion
How to delete old OneDrive folder from computer
Previously, I used OneDrive with one account and have now unlinked that account from OneDrive. After that, I deleted the OneDrive app on my computer and reinstalled the OneDrive app and logged into the new account. However, I cannot delete the old OneDrive folder from my computer. It keeps giving me errors and won't let me delete it. Please help me and show me how to delete the old OneDrive folder
- Mike WilliamsSteel Contributor
Tuan_Anh1705 Which operating system and version? What are the error messages and codes? Do you have admin rights on the computer to delete folders belonging to other accounts?
- Tuan_Anh1705Copper Contributor
Mike Williams Thanks for your support!
Currently, I am using Window 11 version 23H2. Every time I press Shift + Del the old Cloud folder, it looks like the image below, am I using my own PC? Looking forward to your support, thank you very much!- Mike WilliamsSteel Contributor
Tuan_Anh1705 It is as I suspected with the question: "Do you have admin rights on the computer to delete folders belonging to other accounts?"
The account you're logged in with on your computer does not have Administrative rights to delete the folder. You need to login with the Admin account.
This is just a Windows account issue, not a OneDrive issue.
- wdevexpert1_Copper ContributorMethod 1: Using File Explorer
Locate the folder: Open File Explorer and navigate to the location of your old OneDrive folder. It's typically found under your user folder (e.g., C:\Users<your username>\OneDrive).
Right-click the folder: Once you've found it, right-click on the folder you want to delete.
Select "Delete": In the context menu, choose "Delete".
Confirm deletion (if prompted): A confirmation window might appear asking you to confirm deletion. Click "Yes" or "Delete" to proceed.
Method 2: Using OneDrive Settings
Access OneDrive settings: Right-click on the OneDrive icon in the system tray (usually near the clock in the taskbar) and select "Settings".
Choose "Unlink this PC": In the OneDrive settings window, navigate to the "Account" tab. Click on the button labeled "Unlink this PC".
Choose what to do with files: OneDrive will prompt you about what to do with the existing OneDrive files on your computer. Select the option "Keep files on this device". This will remove the folder from OneDrive but keep the files locally on your computer. Then click "Unlink account".
Important Notes:
Method 1 permanently deletes the folder and its contents from your computer. Make sure you have backups of any important files before proceeding.
Method 2 removes the folder from OneDrive synchronization but keeps the files locally. This is useful if you want to keep the files on your computer but don't want them synced to the cloud anymore.
If the folder won't delete: In some cases, you might encounter issues deleting the folder. This could be because the files are still open in another program or because they are set to "read-only".
Close any programs that might be using the files.
Right-click on the folder and its contents, select "Properties", and under the "General" tab, uncheck the "Read-only" attribute (if it's checked). Click "Apply" and then try deleting again.
By following these methods, you should be able to successfully delete the old OneDrive folder from your computer.
<a href="https://webdevexpert.online">webdevexpert</a>- Gemo53Copper Contributor
What probably happened is what happened to me : i have disconnected my account in Onedrive while my office account was already disabled. So, the shortcut in explorer was still there, linked to nothing (with no delete in context menu, and delete button disabled).
What i did :
regeditLook in the hkey_current_user\software\microsoft\windows\currentversion\explorer\desktop\namespace and delete the unwanted name
- Stuart4410Copper Contributor
Gemo53 I had exactly the scenario and issue you described. After scouring the web periodically for a few weeks your solution fixed it perfectly.