The USB Ghost That Wouldn’t Die — and How to Exorcise It (Windows 10)
How To: Fix the issue of Windows sticking the same USB Flash Drive name to any USB connected

Ever plug in a flash drive and watch an old name crawl back from the grave? You format it, rename it, swear at it… and Windows still insists the drive is called something from a previous flash drive connection like TEST or better yet something like CentOS 7 Boot. The stick isn’t haunted. Windows is just clinging to a stale label it cached ages ago.

What’s Actually Haunting Your Drive Letter
Windows keeps notes on every USB you attach: which drive letter it got, what the volume label looked like, a few IDs, and so on. When a new drive inherits an old letter (D:, E:, etc.), File Explorer can reuse the cached label instead of asking the device. That’s how a blank stick shows up wearing someone else’s name tag.
Tools like USBDeview wipe device history, but not the label cache Explorer reads. The fix is to clear the right registry spots so Windows stops reminiscing.
The Ritual (Safe & Simple)
Unplug all USB flash drives first. If they’re still attached, Windows may instantly recreate the same stale entries. Then open Command Prompt (Admin) (Start > type cmd > right-click > Run as administrator) and paste the block below.
:: --- Clear system drive-letter mappings ---
reg delete "HKLM\SYSTEM\MountedDevices" /v "\DosDevices\D:" /f
reg delete "HKLM\SYSTEM\MountedDevices" /v "\DosDevices\E:" /f
:: --- Clear the creepy Explorer cache ---
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2" /f
:: --- Clear any explicit label or icon overrides ---
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\D" /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\E" /f
:: --- Restart Explorer so the spirits rest ---
taskkill /im explorer.exe /f
start explorer.exe
Now reconnect your USB drives. File Explorer rebuilds the info straight from the hardware, no ghosts attached. If you want the belt-and-suspenders version, reboot instead of just restarting Explorer.
Why This Works (In Plain English)
MountedDevicesremembers which letter belonged to which device.MountPoints2feeds Explorer the label and other metadata it thinks belongs on that letter.DriveIconscan override labels/icons by letter, just to keep things spicy.
Clear all three and Windows forgets its old stories. Fresh device, fresh name — finally.
About Those Drive Letters
In the command above, D: and E: are just examples. You can swap in any drive letter you want — F:, G:, or whatever’s being haunted on your system. The command structure stays the same; just change the letter in each line. Here’s a quick example for clearing drives F and G instead:
reg delete "HKLM\SYSTEM\MountedDevices" /v "\DosDevices\F:" /f
reg delete "HKLM\SYSTEM\MountedDevices" /v "\DosDevices\G:" /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\F" /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\G" /f
Those middle lines that clear the MountPoints2 cache don’t depend on specific letters — they only need to run once. Everything else can be repeated or adjusted for any letter you want.
For the Overachievers
If you run a test bench or duplication station and have half the alphabet full of phantom names, you can automate the purge for all removable letters with this one-liner loop:
for %%L in (D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
reg delete "HKLM\SYSTEM\MountedDevices" /v "\DosDevices\%%L:" /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\%%L" /f
)
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2" /f
taskkill /im explorer.exe /f
start explorer.exe
This wipes every potential letter’s cache in one shot. Ideal for workstations that see dozens of different USB sticks — think duplication gear, imaging rigs, or service benches that test drives all day.
Bottom Line
The problem wasn’t your flash drive; it was Windows nostalgia. Keep that command block handy if you image, test, or duplicate USB sticks regularly — it’s the digital equivalent of a little holy water for stubborn Explorer ghosts.
