What's probably happening (I'm not a Windows expert) is that Windows is not happy with the label on your disk, and is refusing to erase your existing Ubuntu partitions.
Try booting Ubuntu from a CD or USB stick, as if you were installing. Once the live image is up, open a terminal, find which disk is your main disk (you don't want to accidentally erase your usb stick), and write zeros in the first few sectors:
To find all your disks:
ls -lR /dev/disk/
This will give you a list of various ways of accessing your disks; the output would look something like...
/dev/disk/by-partuuid:
total 0
lrwxrwxrwx 1 root root 15 Apr 5 16:55 07790ee7-6756-4ac9-8e87-d69f2f944d25 -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 15 Apr 5 16:55 1424ca57-733f-4a83-819e-c280170c3969 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 Apr 5 16:55 934ed3f4-8552-43ac-9ebb-eaa9be78ecce -> ../../nvme0n1p4
lrwxrwxrwx 1 root root 15 Apr 5 16:55 a2578ac7-d50a-4fd0-8657-ae28cbbd30fa -> ../../nvme0n1p5
lrwxrwxrwx 1 root root 15 Apr 5 16:55 ce41bcf2-4f27-4f2d-abf1-3e5c1a79b74e -> ../../nvme0n1p2
(and other lines)
or...
/dev/disk/by-partuuid:
total 0
lrwxrwxrwx 1 root root 15 Apr 5 16:55 07790ee7-6756-4ac9-8e87-d69f2f944d25 -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 15 Apr 5 16:55 1424ca57-733f-4a83-819e-c280170c3969 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 Apr 5 16:55 934ed3f4-8552-43ac-9ebb-eaa9be78ecce -> ../../nvme0n1p4
lrwxrwxrwx 1 root root 15 Apr 5 16:55 a2578ac7-d50a-4fd0-8657-ae28cbbd30fa -> ../../nvme0n1p5
lrwxrwxrwx 1 root root 15 Apr 5 16:55 ce41bcf2-4f27-4f2d-abf1-3e5c1a79b74e -> ../../nvme0n1p2
In the first example, I have one disk named /dev/nvme0n1
; in the second example I have two disks, named /dev/sda
and /dev/sdb
. You see how this works. In your case, /dev/sda
is likely to be your main disk and /dev/sdb
is likely to be your USB stick, but don't take my word for it; check with:
$ sudo fdisk -l /dev/sda
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
...
This shows me that /dev/sda
is indeed may first disk. Now I can erase it:
sudo dd if=/dev/zero of=/dev/sda bs=1024k count=1
That will write a megabyte of zeroes starting at the beginning of the disk, obliterating all information about ubuntu (and anything else you might have on that disk).
Now you can install Windows cleanly.