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!

TL;DR:

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 & 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 special report: 10 Reasons Your Computer is Slow, now updated for Windows 10.

NOW: name your own price! You decide how much to pay -- and yes, that means you can get this report completely free if you so choose. Get your copy now!

Podcast audio

Play

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.

7 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!

    Reply
    • 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.

      Reply
  2. I have found that onedrive moved some VERY sensitive files(banking) from my desktop to onedrive, and removed the icon/links from my desktop. It is very un-settling! I have tried unlinking, and “Always keep on this device” but the files are not restored to my desktop. Where are they? What happens if I permanently loose internet access? can I still get to the files on my PC? …. that is sorta the point, I live in an earthquake risk area.

    Reply
    • Try using Windows Search for the filename and see where they landed. I’m sure they’re on the machine, just not where you expected. Probably due to OneDrive’s “shall I back up system folders for you?” feature.

      PS: this is one more reason why I NEVER EVER store important files on my desktop. Pick/create a folder, store the files there. Put a link to the folder on the desktop if you like.

      Reply
  3. I have asked onedrive to sync my desktop, documents, pictures folders by mistake. When I try to remove them from the Onedrive Settings –> Account. All those files went away from my computer harddrive but they remain in my onedrive web. I don’t understand this at all.

    Reply
  4. Hi Leo:
    Great video, but I don’t seem to be able to open another file that is not connected to OneDrive.
    I purchased a new laptop 10, and the only reason I used OneDrive is from the advertising which states it makes it easy to move files from old computer to your new computer. I wasn’t able to do it, even though I tried. So I moved my files the old way, which worked, but now all my moved files are within OneDrive.
    I don’t seem to be able to open a New File without it being linked to OneDrive. Have I messed up my computer, unable to save my files or move them because my Desktop and C:Drive is all under the file name of OneDrive? Thanks for your input.

    Reply
    • You can open a new file anywhere on the computer you like, inside or outside of the OneDrive folders. Check the default location settings for whatever program it is you’re using to open new files.

      Reply

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.