SEARCH

How-To Geek

HTG Explains: Do You Really Need to Safely Remove USB Sticks?

image

You’ve probably heard that you always need to use the Safely Remove Hardware icon before unplugging a USB device. However, there’s also a good chance that you’ve unplugged a USB device without using this option and everything worked fine.

Windows itself tells you that you don’t need to use the Safely Remove Hardware option if you use certain settings – the default settings – but the advice Windows provides is misleading.

Quick Removal vs. Better Performance

Windows allows you to optimize your USB device for quick removal or improved performance. By default, Windows optimizes USB devices for quick removal. You can access this setting from the device manager – open the Start menu, type Device Manager, and press Enter to launch it.

image

Expand the Disk drives section in the Device Manager, right-click your device, and select Properties.

image

Select the Policies tab in the Properties window.  You’ll notice that Windows says you can disconnect your USB device safely without using the Safely Remove Hardware notification icon, so this means you can unplug your USB device without ever safely removing it, right? Not so fast.

image

Data Corruption Danger

The Windows dialog shown above is misleading. If you unplug your USB device while data is being written to it – for example, while you’re moving files to it or while you’re saving a file to it – this can result in data corruption. No matter which option you use, you should ensure that your USB device isn’t in-use before unplugging it – some USB sticks may have lights on them that blink while they’re being used.

image

However, even if the USB device doesn’t appear to be in-use, it may still be in-use. A program in the background may be writing to the drive – so data corruption could result if you unplugged the drive. If your USB stick doesn’t appear to be in-use, you can probably unplug it without any data corruption occurring – however, to be safe, it’s still a good idea to use the Safely Remove Hardware option. When you eject a device, Windows will tell you when it’s safe to remove – ensuring all programs are done with it.

Write Caching

If you select the Better Performance option, Windows will cache data instead of writing it to the USB device immediately. This will improve your device’s performance – however, data corruption is much more likely to occur if you unplug the USB device without using the Safely Remove Hardware option. If caching is enabled, Windows won’t write the data to your USB device immediately – even if the data appears to have been written to the device and all file progress dialogs are closed, the data may just be cached on your system.

When you eject a device, Windows will flush the write cache to the disk, ensuring all necessary changes are made before notifying you when it’s safe to remove the drive.

image

While the Quick Removal option decreases USB performance, it’s the default to minimize the chances of data corruption in day-to-day use – many people may forget to use – or never use – the Safely Remove Hardware option when unplugging USB devices.

Safely Removing Hardware

Ultimately, no matter which option you use, you should use the Safely Remove Hardware icon and eject your device before unplugging it. You can also right-click it in the Computer window and select Eject. Windows will tell you when it’s safe to remove the device, eliminating any changes of data corruption.

image


This advice doesn’t just apply to Windows – if you’re using Linux, you should use the Eject option in your file manager before unplugging a USB device, too. The same goes for Mac OS X.

Chris Hoffman is a technology writer and all-around computer geek. He's as at home using the Linux terminal as he is digging into the Windows registry. Connect with him on Google+.

  • Published 07/10/12

Comments (44)

  1. Ron

    I always use Safely Remove Hardware after I had 1 jump drive quit working after pulling it without using it

  2. MJ

    Definitely you should always Safely Remove Hardware, with Windows 7 it takes 2 clicks if you pin the icon to the notification area, and you can avoid lots of problems which I experienced personally.

  3. Steve-O-Rama

    Does anyone know why, on the same system, Windows XP would actually shut down a USB-attached device (as in turn off the LEDs completely) when using Safely Remove Hardware, whereas in Windows 7, it doesn’t even flash the LEDs on my USB drives, even after it’s “safe to remove”.

  4. Tom

    I wish Windows 7 gadgets were more prevalent. It could give you easier access to ejecting devices, change default audio output/input, etc.

  5. spike

    I agree with this. I, too, corrupted one flash drive before becoming a staunch advocate of safe removal.
    One trick that I find helpful, when Windows says it cannot stop the device, is to use Unlocker to view (not necessarily unlock) the locking handles, so you can figure out what program is accessing the device.

  6. ken

    MJ you said that you pinned the icon on windows 7, can you tell me HOW you did that????????

  7. ken

    I have never used safely remove, never had a burned flash drive or corruption of data. and this is since the dawn of the existence of flash drives, i just make sure that nothing is being accessed at that time. I will never use the safely remove… period.

  8. r

    never had a problem removing a USB without Safely Remove. I just make sure that nothing is being written to disk first. I always buy USBs with an activity indicator light to help.

  9. KeithLM

    ken, you are running a risk because of the way Windows writes files. If the buffers haven’t filled it up it may not write anything to the drive. I once had a tester report the app I was working on was generating invalid project files. He sent me the files and I found they contained nothing but NULL bytes. When I asked him how they were generated he explained he created them on a test system, copied them to a USB drive and opened them on another system.

    Near as I can figure when copying files to the drive it reserved space on it and waited until the write buffer was full before actually writing the data. Since he yanked the drive without ejecting it the resulting files were of the correct size, but completely empty of data.

  10. Bill

    What if you did not write anything to the USB drive, but only read from it? There should be no risk of corruption in this case, right?

  11. ti

    I just yank & go (hah). As long as it’s done writing to it, I’ve never had any issues.

  12. Dano

    Quit being a sissy and yank that thing out.

  13. spike

    @ken: Simple – In the notification settings, change the “Safely Remove Hardware and Eject Media” icon to “Show icon and notifications”. Or, simpler, expand the hidden icons and drag it down to where you want it.

    @Bill: Theoretically you should be fine. The thing to think about is that the system may be accessing it without you realizing, if you don’t know how to check (Indexer, Backup, etc.)

    @Dano: It’s more a matter of whether or not you are being intelligent.

  14. spike

    @Tom: Actually, I have seen a skin for Rainmeter that does what you are wanting with ejecting media. Haven’t tried it, though.

  15. SithGecko

    Just use USB Disk Ejector. Its free and easy to use.

    http://quick.mixnmojo.com/software/usb-disk-ejector

  16. Citrus Rain

    I had Windows Explorer open once, right clicked the flash drive on the sidebar, and it had an “Eject” button – as I was explaining the difference between how to do it in windows compared to how you would do it in Linux.

  17. HelpDesk Mike

    I have never, I repeat, NEVER used the “Safely Eject” utility and have never lost any info or corrupted any data. I do however wait until the light on the usb drive is no longer flashing. Been doing this since flash drives first came out.

  18. GBarcs

    Seems such a tiny effort to make if your data is important to you!

  19. MP

    Judging by the responses, there are a lot of mavericks in Geek land. But, if is one the first times you have read an HTG article and its’ following remarks. Always, and I mean ALWAYS select the option that is safest to maintain the coherency of your data. Just because something disasterous hasn’t happened to somebody doesn’t mean it won’t happen. I am sure a few here who have experienced it first hand will attest that they also thought nothing would happen, until after it did.

    There is one universal rule that applies to everything a person can do in and with their lives … Impatience is not a virtue, it’s not a luxury, it’s a defect of ignorance without excuse.

  20. fallout330

    Good points MP, I tend to stay on the side of caution…when possible.

  21. Richard

    @ Steve-O-Rama That was bugging me when I first got W7 and also noticed that it depended on the usb flash drive because on some the light stays on all the time and on others the light comes on when transferring files. I very much prefer the light to turn off when safely removing the drive like it does in XP. Anyway… a simple registry edit will revert W7 and Vista to the way XP kills the power to the drive. This is what I use, just copy/paste to notepad and save, change the file extension from .txt to .reg. Double-click and run, piece of cake! http://support.microsoft.com/kb/2401954

    Windows Registry Editor Version 5.00

    ;Power Down USB Port when “Safe to Remove Hardware” in W7 & Vista
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\usbhub\hubg]
    “DisableOnSoftRemove”=dword:00000001

  22. nonosh

    @MP,

    Did you come up with that philosophical comment yourself? I’d like to quote it.

  23. vgamesx1

    @MP
    well said…

    I for one usually do this, and guess what? it only takes about 2 clicks and up to 5 seconds to do.
    so really its just lazy and ignorant to not do it, if you find your data important, then you should make sure to keep it safe.
    also with programs like Dropbox and sharing files over a network on a LAN or WAN, I don’t see much use for flash drives today anyway, other than storage.

  24. Dale
  25. Timo

    Regarding the safe to remove USB device. Hopefully one day the developers of these USB devices will instal a remove button on the device which key presses the registry to flush the crèche and start the removal process. Wouldn’t that make it that faster and safer for the product. Press the button wait for the pc to say ok and pull it out. Gee I’m to good!

  26. CJ

    Agree with HelpDeskMike. NEVER used “safely remove”, NEVER had a problem. And I am supremely confident I never will. Anal retentive people in comments above aside… It is all in the way you use (and do NOT use) the USB stick. If you understand that it is really not a “drive”, it’s just a portable storage device, one that certainly WILL fail someday, then you will never have the slightest trouble.

    1. Data only. No programs installed, no backup routines, nothing that runs automatically when you plug it in, no programs that automatically access it. Format it to clean all that crap it comes with, and just put your files on it, nothing else.
    2.. Don’t pull it when it is being read from or written to.
    3. Close/save anything you opened from it before you pull it.
    4. NEVER have any data that only exists on a USB stick, and nowhere else. That is begging for pain! It must exist on a harddrive somewhere else, too. (this one is a surprisingly common downfall, people think “oh cool, I can have all my stuff just on this little stick, and nowhere else, so I am completely safe”, and then the stick falls in the toilet)

    And that is it.

    Personally I only use my keychain USB these days for encrypted text files with personal financial data, and a few largish installable programs or CD copies. Everything else I need access to is on my Google Drive.

  27. sill

    @ MP

    nice speech if you’re running for president, lots of unspecific generalizations & clechés that don’t really go anywhere.

  28. Tat2Jr

    Been computing since the 80’s. Never used the safely remove. Just common sense. Worked perfectly until about 4 months ago when my xp machine completely crashed because of my common sense. I tried everything I could to get it booting again. Finally called the computer repair guy and he left without charging me because I’d tried everything there was to try. Long story short – I always use it now and I’m enjoying the last 4 months on Windows7.

  29. Steve-O-Rama

    @ Richard:

    Thank you so much for that info! I feel a bit foolish for not looking for the answer right at the source, in this case Microsoft. But then again, it’s still strange to me that MS would change the way USB devices are (dis)mounted and (dis)connected. The article gives a bit of background information, but not a solid answer as to why it was changed between XP and Vista (if I’m honest, I have only skimmed the article, so I will probably find the answer if I sit down and read it beginning to end :).

    The fact that it can be applied as a per-device OR global behavior is awesome IMHO. There are numerous devices I use where that will come in handy.

    Thanks again!

  30. Jason

    @ TAT2JR

    What in this green earth were you running from a data usb that bricked your “entire” system…that the read/write function of said usb corrupted your boot system/boot sequence…by simply removing said usb without “ejecting” it!?!?

    Please enlighten us on how that alone did so much.

  31. Jason

    If this has been said, forgive me on tired, however the reason I seldom eject the usb is because in W7 it gives so many false active ” can not eject, device in use” garbage it is a useless function. I only store data. No bloated start up programs or system resource via usb. Data read, data write. File copy, file paste…usb in use by system still? — as the great faux Sean Connary says, Suck it Trabeck, I need my usb back!!

  32. Al

    Life is Too Short to Remove USB Safely

  33. LASERman

    You can make Ejecting USB storeage device easier by using small utility called EjectUSB:
    http://www.softpedia.com/get/PORTABLE-SOFTWARE/System/System-Enhancements/Windows-Portable-Applications-EjectUSB.shtml
    Run EjectUSB from USB device you like to eject and it will try to close any programs using it. This will avoid nasty message you can get using windows safe eject saying: “device is in use…”

  34. James

    +1 to the idea of just pulling out the stick. Been using USB sticks since they first came out and i’ve never lost data because of pulling out the stick.

  35. Thomas

    This is the shortcut I created for my Windows XP desktop. It should work for new versions of Windows, but your mileage my vary. C:\WINDOWS\system32\rundll32.exe shell32.dll,Control_RunDLL hotplug.dll

  36. Raphael

    Like Ken wrote I to “I have never used safely remove, never had a burned flash drive or corruption of data. and this is since the dawn of the existence of flash drives, i just make sure that nothing is being accessed at that time. I will never use the safely remove… period.” If there is nothing wrong why fix it?

  37. Larry

    I always use the safe removal but a few times i have had it to tell me another program is being in use and will not let me do it..Only way i have found out to stop the program that is not letting me safely remove is go into task manager and find the program that is listed Services or Processes and close it out..The one program im talkin about is Super anti spyware wich i did a download to the Flash Drive for Bootable purposes in case i got something that would not let the puter boot…When i used the scan to check puter for spyware it installed on the puter as well and reason im haveing the issue with the safe removal..Any advice on a work around other than way i described i have been doing it???

  38. spike

    @Raphael: The functionality is there because not everyone knows how to be sure that nothing is accessing it.

  39. jimlad

    Lol stop being so anal guys, if it not being written to your safe to pull, I have never NEVER used remove safely.. I’ve used loads of different brands, different sizes, never have I had corrupted files.

  40. abilions

    It doesn’t matter if you unplug your pendrives directly.
    but we definately have to use “Safely Remove Hardware Icon” for usb harddrives
    or else data is lost or corrupted.
    If the drive is not ejected or its taking long time, then just shutdown the system and unplug it.

  41. Erika

    I worked in a small school and the #1 problem with students losing files was removing without ‘safe remove.’ It takes 2 seconds, I’d rather take the two seconds than deal with lost/corrupt files.

  42. Jim

    After ejecting a thumb drive and NOT removing it, is there a way to reenable the drive without unplugging and replugging the drive back in?

  43. wefrawefawefawe

    2 clicks is all it takes? TWO CLICKS TOO MUCH.

  44. kura

    you need to shutdown and install those windows updates lol

Enter Your Email Here to Get Access for Free:

Go check your email!