In most scenarios, I have RMAN delete the archive redo logs based on the retention policy of the database backups. This is the default behavior. You can view the database retention policy, using the SHOW command:
RMAN> show retention policy;
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
To remove archive redo logs (and backup pieces) based on the database retention policy, run the following:
RMAN> delete obsolete;
As of Oracle 11g, you can specify an archive redo log deletion policy that is separate from that of the database backups. This deletion policy applies to archive redo logs both outside and in the FRA.
Note Prior to Oracle 11g the archive deletion policy only applied to archive redo logs associated with a standby database.
To configure an archive redo log deletion policy, use the CONFIGURE ARCHIVELOG DELETION command. The following command configures the archive redo deletion policy so that archive redo logs aren’t deleted until they have been backed up twice to disk:
RMAN> configure archivelog deletion policy to backed up 2 times to device type disk;
To have RMAN delete obsolete archive redo logs, as defined by the archivelog deletion policy, issue the following command:
RMAN> delete archivelog all;
Tip Run the CROSSCHECK command before running the DELETE command. Doing so ensures that RMAN is aware of whether a file is on disk.
To see whether a retention policy has been set specifically for the archive redo log files, use this command:
RMAN> show archivelog deletion policy;
To clear the archive deletion policy, do this:
RMAN> configure archivelog deletion policy clear;