Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

How Do I Delete Files From OneDrive, but Not My Computer?

How can I delete files from OneDrive’s cloud storage without deleting them from my PC?

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.

Back Up

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.

OneDrive Recycle bin online
OneDrive Recycle Bin online (Click for larger image.)

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.

Emptying the recycle bin
Emptying the online recycle bin.

Unlink OneDrive

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”.

OneDrive Settings
OneDrive settings.

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.

No solution

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! Tech problem solving & safety tips with a weekly confidence boost in your inbox every week.

I'll see you there!

10 Reasons Your Computer is Slow

Slow Computer?

Speed up with my FREE special report: 10 Reasons Your Computer is Slow, now updated for Windows 10.

No strings. No email. Here's the direct download. (Just right-click and "Save As...".)

Podcast audio


Footnotes & References

1: Technically, a move may or may not actually perform a true copy/delete sequence, depending on the disks involved, but the results are the same either way.

2: I believe it’s 30 days, but of course that’s subject to change, and may even vary depending on your OneDrive plan.

3: Note that the ability to “Choose Folders”, and “Files On-Demand” — features in OneDrive settings — is the exact opposite of what we’re being asked here. These features allow you to elect not to have files present, or take space, on your computer. Regardless, they’re present on-line.

2 comments on “How Do I Delete Files From OneDrive, but Not My Computer?”

  1. I recently had a new hard drive installed on my computer. When I uploaded data I had backed up on external hard drive, all files went both to hard drive and One Drive. I only want to use One Drive for a few documents. I have followed your directions for deleting files from One Drive but leaving on computer. I moved everything from One Drive to a non-One Drive new folder; but unlike what you stated, all files were also deleted from regular folders. When I moved them from the new file back to computer, they also went back onto One Drive. I am going crazy! What am I missing? Help please!

    • What do you mean by “all files were also deleted from regular folders”? Were they gone from the folders you moved them to? You mentioned that you moved them back. That would seem to indicate that they weren’t deleted.


Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.