Erase CD-RW/DVD-RW In Ubuntu

Ubuntu comes with Brasero (since 9.04), you can use it to erase a CD-RW/DVD-RW
But, in case you want a quick and dirty way to erase CDs and DVDs with a terminal command you are in luck.
1. Insert your CD or DVD in the tray.
2. Fire up the terminal and issue the following command:
umount /dev/cdrom

cdrecord dev=/dev/cdrom blank=fast
Thats it, use your shiny CD/DVD for burning any movies or things.