set your ORACLE_SID to an ASM instance
using asmcmd locate the directory that contains the archive log files. for example..
ASMCMD> cd +POC2FLASH/POC2DWH/ARCHIVELOG
using 'rm' command you can delete the directory.
But don't forget to remove the archive log details from the control file or the RMAN catalog
For this you need to connect to the target database using rman
rman target sys/<password> nocatalog
rman>crosscheck archivelog all
rman>delete expired archivelog all
you need 2 scripts (modify paths accordingly as per your setup):
connect / as sysdba
set serveroutput on;
declare CURSOR cur IS
FROM v$asm_alias a, v$asm_file b
where a.group_number = b.group_number
and b.creation_date < sysdate-7
and a.file_number = b.file_number
and a.name like '%.arc'
order by a.name;
FOR cur_rec IN cur
sqlstr := 'alter diskgroup ASM_BACKUP drop file ''+ASM_BACKUP/DB1/' || cur_rec.name || '''';
EXECUTE IMMEDIATE sqlstr;
crosscheck archivelog all;
delete expired archivelog all;
If your whole objective is to clean the disk group, then you should really not bother about RMAN.
RMAN crosscheck will come in to picture when you want to backup archielogs in future, Oracle will always look for the archives which u already deleted using RM command or using alter disk group command but RMAN is not aware of these deletion.
RM or alter disk group command does not update your controlfile so you need to crosscheck whenever in future you want to backup the archivelogs.
You can query v$archived_log:deleted column to see if the controlfile is update or not.