Delete a partition in Linux with fdisk

You must be in fdisk command mode to do this:

fdisk /dev/sda
Next, enter d to delete any given partition name from the system. As d is entered, it will prompt to enter partition number to be deleted from /dev/sda hard disk. Suppose number 4 is entered - the /dev/sda4 will be deleted:
Command (m for help): d
Partition number (1-4): 4
Enter w to write partition table to disk:
Command (m for help): w
The partition table has been altered!