Circuit to disconnect USB
The Transistor approch is OK, but I recommend using a P-channel MOSFET to switch the +5 Volt.

USB data lines are pulled low on the host side anyway, so switching just the power line is safe. But don't try to switch GND.