I'm new to this forum. I run windows 10 on my PC and successfully installed ubuntu onto a USB flash drive, but ended up installing the Grub bootloader onto my main PC nvme drive that my OS is on. It doesn't effect my booting in anyway. My PC will boot straight into windows and into ubuntu when I f12 to the boot manager screen and select ubuntu. Its shows my exact main OS drive twice in the windows boot manager. It shows my main drive and then it shows my main drive again with along with the name ubuntu. I know how to do it right next time and how to get the bootloader onto my USB drive, but how to I remove grub from windows PC? I have no idea where it installed and how to remove it. Thanks in advance everyone!
Grub puts its first stage on the MBR of the drive you specified. The MBR is the first sector (first 512 bytes of device).
sudo grub-install /dev/sdX
will install grub's first stage to the device you specify (ie. work out the device name for the thumb-drive you want it on, and use that instead of sdX).
The command in windows varies on your release (& setup),
bootrec /fixmbr may work, but windows 10 often needs extra commands (off-topic here though)