Archive logs are critical for database recovery, Data Guard, and point-in-time restores—but if not managed correctly, they can quickly fill up disk space. Oracle RMAN provides multiple archive log delete options to help DBAs safely manage archive logs without risking recoverability.
In this guide, we’ll break down all major RMAN archive delete options, explain when to use each, and share best practices for production systems.
Why Archive Log Management Matters
Unchecked archive logs can cause:
- Filesystem or ASM diskgroup full
- Database hangs (ARCH cannot write)
- Data Guard lag or failures
- Backup jobs failing unexpectedly
RMAN archive delete options allow you to:
- Free space safely
- Protect recoverability
- Align with backup and standby requirements
Basic RMAN Archive Log Delete Command
The simplest form:
DELETE ARCHIVELOG ALL;
⚠️ Dangerous in production
This deletes all archive logs RMAN knows about, regardless of backup or standby status.
Use only in test systems.
Delete Archive Logs Older Than N Days
One of the most commonly used options:
DELETE ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-7';
What it does
- Deletes archive logs older than 7 days
- Time-based cleanup
Use case
- Environments with:
- Daily RMAN backups
- No strict recovery window beyond N days
Delete Archive Logs Backed Up at Least Once
DELETE ARCHIVELOG ALL BACKED UP 1 TIMES TO DISK;
Why this is safer
- RMAN deletes logs only after successful backup
- Prevents data loss due to missing backups
Recommended for
✔ Production databases
✔ Systems without Data Guard
Delete Archive Logs Backed Up to Tape
DELETE ARCHIVELOG ALL BACKED UP 1 TIMES TO SBT;
Use case
- When tape (SBT) is the primary recovery medium
- Common in enterprise backup setups
Delete Archive Logs Until a Specific Sequence
DELETE ARCHIVELOG UNTIL SEQUENCE 12034;
When useful
- Manual cleanup after troubleshooting
- Emergency space recovery
⚠️ Use with caution—sequence-based deletion bypasses time safety checks.
Delete Archive Logs Until a Specific Time
DELETE ARCHIVELOG UNTIL TIME 'SYSDATE-1';
Deletes logs generated before the last 24 hours.
Data Guard–Safe Archive Log Deletion
Delete logs applied on all standbys
DELETE ARCHIVELOG ALL APPLIED ON ALL STANDBY;
Why this is critical
- Ensures standby databases have applied the logs
- Prevents Data Guard gaps
Best practice for Data Guard
Always combine APPLIED ON STANDBY with BACKED UP.
Example:
DELETE ARCHIVELOG ALL
BACKED UP 1 TIMES TO DISK
APPLIED ON ALL STANDBY;
Delete Archive Logs Without Prompt
For automated jobs:
DELETE NOPROMPT ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-3';
Used in:
- Cron jobs
- OEM jobs
- Maintenance windows
Crosscheck Before Deleting (Highly Recommended)
Always run:
CROSSCHECK ARCHIVELOG ALL;
DELETE EXPIRED ARCHIVELOG ALL;
Why?
- Cleans up RMAN metadata
- Avoids RMAN thinking missing logs still exist
Recommended Safe Production Strategy
For NON–Data Guard systems
DELETE ARCHIVELOG ALL
BACKED UP 1 TIMES TO DISK
COMPLETED BEFORE 'SYSDATE-2';
For Data Guard systems
DELETE ARCHIVELOG ALL
BACKED UP 1 TIMES TO DISK
APPLIED ON ALL STANDBY
COMPLETED BEFORE 'SYSDATE-2';
Common Mistakes to Avoid
❌ Deleting archive logs without backup
❌ Ignoring standby apply status
❌ Running DELETE without CROSSCHECK
❌ Using DELETE ARCHIVELOG ALL in production
❌ Forgetting ASM diskgroup usage monitoring
Final Thoughts
RMAN archive log deletion is not just cleanup—it’s part of your recovery strategy. Choosing the wrong delete option can silently break recoverability, while the right one keeps your system healthy and compliant.
If you manage production databases on Oracle Database, always align archive deletion with:
- Backup retention policy
- Recovery window
- Data Guard configuration




