Windows Keeps Registry Information for USB Drives Even After They're Unplugged
Microsoft has clarified why Windows remembers USB drives even after they are unplugged. The operating system keeps registry information for devices connected, including their names and hardware identifiers, as part of its Plug and Play feature.
The keys to this information can be found in the registry under HKEY_LOCAL_MACHINE/system/CurrentControlSet/Enum/USBSTOR. Windows also maintains a list of non-present devices, or 'phantom devices,' which are still visible in Device Manager even after they have been removed.
This behavior is not unique to Windows and can be seen in other operating systems such as Linux and macOS, which also maintain device information and system logs for hardware. Microsoft has documented this behavior since 2012, when a premier field engineer named Jason Walker wrote about it on the company's Scripting Blog.