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?

Question: 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.

Do this

Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.

I'll see you there!

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.

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

      • I know exactly what Gretchen means, because I’m having the same problem, but I can’t explain it better than she can. I agreed to use onedrive and signed up because I thought it was a backup service. It’s not. It takes every single file, music, pictures, docs, and moves it to the cloud. I don’t always have internet available, so I want those things stored on my computer, and to have a choice about storing important things online for backup. Now I want to bring back my files, and scrap onedrive. There are better options. Ones that don’t steal everything and make your life hell.

  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.

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

  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.

  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.

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

  5. Using a new laptop, OneDrive uploaded all of my .jpg files, many of which were from Flight Simulator. It overloaded the max capacity (for free – 15GB) I have gone to OneDrive to download any .jpgs I want to save on my PC, and then delete the remaining files on OneDrive, but the capacity overload message is always the same and the amount of data I deleted from OneDrive always stays the same. When I look at the files showing in OneDrive, many of them say they have 0 bytes, but I delete, then empty trash, delete, then empty trash, and on and on, but the amount of space used is always the same??? I turned off OneDrive, so it is not synching with PC and same results. Google stopped my gmail as a result and I have not used that account in months. Any suggestions??

    • I don’t see how Gmail relates to this at all. It’s completely separate.

      My GUESS is you have OneDrive’s “backup” feature turned on and that you’re uploading to OneDrive WAY WAY WAY more than you think, or that you need to. Turn that feature off, and the online look for backed up PCs in your account.

  6. Hello,

    All I want to do is stop using one drive and have one drive send my files back to windows 10 where they were located in the first place. I do not wish to use one drive whatsoever. I am not sure how they went there in the first place. It keeps telling me it is full. What does it have, 5 G? I have 550 G free space on my C drive and 700 G on E. I do not need nor want One Drive. I want to be able to find what I am looking for without One Drive removing my files to store them at a whim. In what order do I use to do this transformation? Also have no idea what the password would be for OD. This seems to have been planed by Windows for one to purchase this. I do not need extra space.

    • One Drive doesn’t remove files to store them. Unless you set it up specifically so that the files are on OneDrive and not your computer, the default is that any OneDrive files are both on your computer and on the Microsoft OneDrive folder.
      If you are exceeding the maximum storage quota, you can simply move files from the OneDrive folder to another folder, and the file will be removed from Microsoft OneDrive server.

  7. By “move” do you mean drag and drop with the left (primary) mouse button, or right (secondary) mouse button and pick move when dropped into the folder on the laptop?

    I ask because left drag and drop files between drives normally copies the files, it doesn’t move them.

  8. I have identical files on both One Drive and in another folder on my hard drive. I have moved them as suggested, however I cannot delete from One Drive so they are only on my hard drive. When I try, the files re deleted in both instead of just One Drive. I have Windows 11.

  9. I have unlinked OneDrive as instructed in the article as I do not wish to use it. The article states in the unlink section, “You can now visit OneDrive online and delete all the files you like, and they will not be deleted from your PC.” However, I do not seem to be able to get into OneDrive online now. When I click on the icon in the notification area, going to OneDrive online is not an option. How do I get to OneDrive online now? I have Windows 11.

  10. I’m hopeful I’ve managed to disconnect my one device — my desk top computer — from OneDrive. I’m an isolated senior who bought a new computer. I did not realize Microsoft was installing a program that would automatically suck up everything stored on my hard drive and share it with the “cloud.” I do not want copies of my medical records or my ID uploaded into anything accessible to others with more computer skills than I’ve got. I wish they’d allowed for an option, that before they took, they asked.

  11. Hi, Just for info I’m assuming I must be missing something Onedrive hoovers up all my data even the stuff outside of the supposed Onedrive file.
    Been unable to find the bit where it says backup or not.

  12. I have the same question as another user, but didn’t see an answer…I am trying to move some things out of my one drive to only my computer, but somewhere in the background settings one drive sees my documents on my computer as part of the one drive documents…I am not a computer ‘user’ (to me it is a very expensive typewriter) so don’t know how to get to the places to look which parts of my PC OneDrive can “see”, nor how to change that to be just my PC.

    The only part of my PC that I wanted to go to one drive was documents.

  13. okay…….HUGE THANK YOU……I did it; after two years of angst your instructions helped me separate what should and should not be on the OneDrive. I cannot thank you enough…….even with my almost non existent computer skills, your advice was super clear and I was able to follow it to have my computer ‘see’ the new path I wanted it to follow :)
    Thank you!!!

  14. I have three computers that I log into the same one drive account. The very first thing that started happening it one drive merged every one of the desktops into a single conglomerated mess. I still have not got things straightened out. I wish they would have kept the desk tops unlinked and let me decide whether to link or not.

    Great article. I learn something every time I watch one of your videos.

  15. I too was having the same problem as many others. Every computer I log into has it’s files synced to every other computer and the cloud. I was aghast at what I saw and became angry at not being able to understand MS instructions as to how this works. I have never had any success with any sync app or program, only frustration and loss of files.
    After reading through Leo’s article and trying to make sense of what he is saying and still not agreeing with all of what he said, I am trying something different. I turned quit the OneDrive app or program on both computers that I am having the most problems with to see if when one or the other or both reboots, does OneDrive start up and begin syncing all by itself again. That’s my fear in this ongoing fight. I did notice that now there is no more lag when moving files around. No more waiting for OneDrive to manipulate my every move. If this step works I now have to begin to dig out and sort the files and folders on each of these computers back to where they should be. No more comingling.
    One thing that Leo keeps talking about is that the OneDrive folder under the windows/user folder has all the files that OneDrive uses to sync to the cloud. It doesn’t make sense as myself and others here talk about moving and or creating files in the windows/documents folders yet they are synced to the cloud and then found to be in the windows/OneDrive folder as well. Now, my test will be to see if the syncing restarts on a restart of the computers. Not only that but, even though I’ve quit the programs on both computers and the lag is gone, I still see where a file created or moved into the windows/documents folder also is synced into the windows/OneDrive folder. So, even though I don’t see the service running in the Task Manager or anywhere else, it does appear to still be running. I’m thinking a reboot will kill it and hopefully it will not start up again by default after the reboot. We all know how these companies are these days, trying to siphon more from our wallets every which way. Off subject, I know but you get my drift. I hope I’m helping someone else here with this. Stay tuned and Leo, please comment if you like.

  16. Best advice on this page – UNLINK One Drive from your PC.
    I used it for a short while before coming to the conclusion that it is a heap of rubbish and the designers need to go back to school to learn how to design something that works in a way that the END USER WANTS, not something that by default causes pain a grief.


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.