From a command line, it looks quite simple
Blanking CD-RW or DVD-RW Media
Here are a few methods to quickly blank CD-RW/DVD-RW media:
Finding your CDROM or DVDROM drive
How to find more useful information about your CDROM / DVDROM drive: cdrecord -scanbus