There are two basic approaches to deleting files from OneDrive online cloud storage while still keeping copies for yourself.
Which you want depends on whether or not you want to continue to use OneDrive at all.
Become a Patron of Ask Leo! and go ad-free!
The best way to delete a file from OneDrive but keep it on your computer is to move it out of your OneDrive folder to another folder on your PC that isn’t within OneDrive. Depending on the urgency, you may then want to empty OneDrive’s Recycle Bin online. The other approach is to unlink OneDrive from your computer entirely.
We’re about to intentionally delete files… yet we want to make sure we keep those files. What could possibly go wrong?
Well, just about anything. There are certainly mistakes that could be made, accidentally deleting the file from both OneDrive and your PC.
By now, I hope you know the best way to protect yourself from these types of mistakes.
Back up first.
Move the file
If you’re continuing to use OneDrive for other files, and it’s just specific files you no longer want stored in the cloud, the solution is fairly straightforward: move the files out of your OneDrive folder.
For example, if you have a file “Document.docx” in your OneDrive folder, which would be stored on your hard drive as C:\Users\<username>\OneDrive\Document.docx, you could move it to a different folder, like C:\Users\<username>\Documents\Document.docx.
Moving a document outside the OneDrive folder to a different folder that is not in your OneDrive folder does several things:
- It makes a copy1 of the file in the new location on your PC, not in OneDrive.
- It deletes the copy of the file in the OneDrive folder on your PC.
- It deletes the copy of the file in OneDrive online.
The file is still on your PC, just in a different location, and no longer in OneDrive online.
Or is it?
Empty OneDrive’s online Recycle Bin
Just like your PC, OneDrive has a recycle bin online. Your deleted files will remain there for some period of time2 before they’re permanently deleted.
If that’s OK, you’re done. The file will disappear from OneDrive online eventually.
If, however, you need the file to be deleted immediately, you’ll want to visit your OneDrive folder online, view the Recycle Bin, and click on Empty recycle bin to make it all go away right now.
If you’re walking away from OneDrive, a different approach is to unlink your computer’s OneDrive folder from OneDrive online.
Click on the OneDrive icon in your notification area and click on Settings. In the General tab of the resulting dialog is a link to “Unlink this PC”.
This will remove the linkage between your computer and your OneDrive online storage. You can now visit OneDrive online and delete all the files you like, and they will not be deleted from your PC.
Caveat: After I unlink OneDrive, I always rename the OneDrive folder to something else. Even calling it “Old-OneDrive” will do. While nothing should go wrong, it feels odd to have a folder on my PC called OneDrive that isn’t actually linked to OneDrive. I’d also be concerned about other software making assumptions if that folder is found.
People asking this question are often looking for how to leave a file within their OneDrive folder on the PC, and yet not have it be present online.
That’s not how OneDrive works.3
If you have a OneDrive folder on your PC connected to your OneDrive account and online storage, then the files you put in that folder on your PC will be placed in OneDrive’s cloud storage. That’s kinda the point of OneDrive.
If that’s not what you want, either move or create your files outside of your OneDrive folder, or don’t connect or use OneDrive.
Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.
I'll see you there!