Use fdisk -l
to find the correct index
Delete the existing filesystem
d
Create a new partition
n
Primary partition
p
Partition number
1
Set the system type to Linux
t
83
Press return to skip the start and end cylinders
Write the changes to disk
w
Reboot for the kernel to detect the new partition
mkfs.ext4 /dev/sda1