If you want to Erase CD-RW/DVD-RW in Ubuntu use the one of the following options
Open your terminal and run the following commands
cdrecord dev=/dev/cdrom blank=fast
Install brasero using the following command
sudo apt-get install brasero
After installation you need to go to Applications/Sound & Video/brasero.One of the options on the Disc menu is to erase the disk.
You can also use k3b.