I do take cold backups of my database (96G) using RMAN (to disk). My configuration parameter for disk storage is as follows:
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT $ORACLE_BASE/backup/db_name/%U';
This configuration creates a backup set with 3 pieces. Now, i need to set the configuration such that every time a backup is taken, it should override the present set/pieces & replace them with a new set/pieces, such that the old set/pieces would be automatically deleted.
Cool. If my memory serves me right, the %U is manditory. So you'll end up with an unpredictable file name.
Some kind of hand-off between the tape backup routine and the disk backup script will need to be worked out. You don't want to delete the old backup unless your sure it's on tape. We have the sys admin's write a file when they're done. I check for the file before proceeding with the disk backup (which includes removing the old backup pieces first).
if [ -f /rman/tape_done ]; then
echo "No tape_done file present, backup terminated"|mailx -s "Backup Error - Missing /rman/tape_done File" email@example.com,firstname.lastname@example.org
... proceed with backup script here...
If i understand the OP's requirement correctly then he wants to just keep only one backup .
with rm RMAN would never know what happened to the backup with delete RMAN knows that the backup has been deleted.with rm the OP has to to run crosscheck command sometime later to inform RMAN that the backup has been deleted and the catalog records have to be synced.