Delete Debug Logs
- Open Developer Console.
- At the bottom of the console, select the Query Editor tab.
- Select Use Tooling API.
- Enter this SOQL query:SELECT Id, StartTime, LogUserId, LogLength, Location FROM ApexLog
- Click Execute.
- Select the logs you want to delete. To sort by a column, click its header. To select individual logs, press Ctrl (Windows or Linux) or Command (macOS). To select a block of logs, press Shift.NoteLogLength shows the size of the log in bytes.For system logs, Location is SystemLog. System logs are generated as part of system log monitoring, such as while you use Developer Console, and are visible only to you.For monitoring logs, Location is Monitoring. Monitoring logs are generated when your org has active CLASS_TRACING or USER_DEBUG trace flags. These logs are visible to all your org’s admins.Debug logs have the following limits.Each debug log must be 5 MB or smaller. Debug logs thatare larger than 5 MB are reduced in size by removingolder log lines, such as log lines for earlier System.debug statements. The log lines can be removed from any location, notjust the start of the debug log.System debug logs are retained for 24 hours. Monitoring debug logs are retained forseven days.If you generate more than 250 MB of debug logs in a 15-minute window, your trace flagsare disabled. We send an email to the users who last modified the trace flags, informingthem that they can re-enable the trace flag in 15 minutes.When your org accumulates more than 250 MB of debug logs, we prevent users in the orgfrom adding or editing trace flags. To add or edit trace flags so that you can generatemore logs after you reach the limit, delete some debug logs.
- Each debug log must be 5 MB or smaller. Debug logs thatare larger than 5 MB are reduced in size by removingolder log lines, such as log lines for earlier System.debug statements. The log lines can be removed from any location, notjust the start of the debug log.
- System debug logs are retained for 24 hours. Monitoring debug logs are retained forseven days.
- If you generate more than 250 MB of debug logs in a 15-minute window, your trace flagsare disabled. We send an email to the users who last modified the trace flags, informingthem that they can re-enable the trace flag in 15 minutes.
- When your org accumulates more than 250 MB of debug logs, we prevent users in the orgfrom adding or editing trace flags. To add or edit trace flags so that you can generatemore logs after you reach the limit, delete some debug logs.
- Click Delete Row.
- To confirm the log deletion, click Yes.