How do I delete a re-writable CD-RW in Ubuntu?

1

I want to format my CD-RW to clear the data on it on Ubuntu 16.04. I have the dialog below to select options:

format dialog

But when I go to format it, it gives this error dialog:

Error wiping device: Command-line `wipefs -a "/dev/sr0"' exited with non-zero exit status 1: wipefs: error: /dev/sr0: probing initialization failed: Read-only file system (udisks-error-quark, 0)

The drive is a DVD-R/RW drive and I can read the CD fine.

Chloe

Posted 2016-12-04T23:27:54.990

Reputation: 4 502

Do you want to wipe it completely (remove any existing partitions) or just wipe a filesystem that is already partitioned? – timotree – 2016-12-04T23:43:24.883

Answers

1

Maybe wipefs failed because the disc is mounted? Run

lsblk

to check whether the optical drive is mounted, and do this to unmount it if needed:

sudo umount /dev/sr0

Then try running

wipefs -af /dev/sr0

where sr0 is whatever your optical drive actually is - double check to make sure!

Alternatively, try

cdrecord -v dev=/dev/sr0 blank=fast

Strife89

Posted 2016-12-04T23:27:54.990

Reputation: 36

1If the OP wants to wipe the entire device than (albeit slow and ineffiecent) dd if=/dev/null of=/dev/sr bs=512 may work too. – timotree – 2016-12-04T23:48:54.717

1Yeah! The last line worked! But I had to install something called wodim. It wasn't mounted: umount: /dev/sr0: not mounted. – Chloe – 2016-12-04T23:51:53.977

@Chloe Good to hear! – timotree – 2016-12-04T23:53:08.340