Hi

allocate channel ch1 type
disk format '/Backup/orcl/%d_ARCH_%u_%s_%p';
backup archivelog
until time 'Sysdate-2' all
delete input;
release channel ch1;

Will keep only two days worth of archivelogs and delete the rest of archivelogs after backing them up.If the backup is not sucessfull delete will not happen.

regards
Hrishy