Dd fails on USB stick

I am trying to wipe clean a USB stick. What am I doing wrong?

[root@ion-desk ion]# fdisk /dev/sdc

Welcome to fdisk (util-linux 2.42.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): p
Disk /dev/sdc: 14.46 GiB, 15525216256 bytes, 30322688 sectors
Disk model: STORE N GO
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: A4FA9C7A-91F7-4BB5-BA90-5B4AA9F8456D

Device Start End Sectors Size Type
/dev/sdc1 2048 30320639 30318592 14.5G Linux filesystem

Command (m for help): q

[root@ion-desk ion]#

root@ion-desk ion]# dd if=/dev/null of=/dev/sdc1 bs=4M status=progress
0+0 records in
0+0 records out
0 bytes copied, 5.4791e-05 s, 0.0 kB/s
[root@ion-desk ion]#

sudo dd if=/dev/zero of=/dev/sdX bs=4M status=progress

Edit: This will wipe the usb stick. After wiping, the USB will have no partition table. You must create a new partition table.

Are you trying to reformat the entire device (/dev/sdc), or a single partition (/dev/sdc1)?

I want to wipe the whole drive /dev/sdc so it’s clean. I thought writing nulls would clean it. Then create /dev/sdc1 and format it as ext2 or ext4.

I was using /dev/null. When try again with zero…

[root@ion-desk ion]# dd if=/dev/zero of=/dev/sdc1 bs=4M status=progress
2071986176 bytes (2.1 GB, 1.9 GiB) copied, 1 s, 2.1 GB/s
dd: error writing ‘/dev/sdc1’: No space left on device
962+0 records in
961+1 records out
4032819200 bytes (4.0 GB, 3.8 GiB) copied, 1.98206 s, 2.0 GB/s
[root@ion-desk ion]#

Which is why I’m trying to wipe the disk.

The command @ricklinux gave you will wipe the device. Your command is only formatting /dev/sdc1. Btw, the dd command, when used this way, will run out of space; it just keeps writing until it can’t.

You need to use /dev/sdc
As was pointed out
Also add count=100 - you dont really need to wipe whole drive. Only part of it at start.
After dd finish run in terminal sync command and wait for it to finish.
Then pull off usb drive and connect it again.

this shows that the command ran and by the looks finished successfully. So the drive should now be wiped and ready for new data. Should go ahead and mark @ricklinux’s answer as the solution.

Not sure why the OP is using sdc1. In my mind that would be a partition not the whole drive. :thinking:

sudo dd if=/dev/zero of=/dev/sdc bs=4M status=progress worked and all is well. Thanks to all for the advice.