function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Imtiaz PashaImtiaz Pasha 

Hi All i want delete All debug logs in my production in one short can anyone help me how to run query to delete those debugs logs

VinayVinay (Salesforce Developers) 
Hi Imtiaz,

Below are details 

1. Open the Developer Console
2. Select the Query Editor tab near the bottom of the console page
3. Select the Use Tooling API check box.
4. Execute the query 'select id from apexlog'
5. Query Results will list available rows to be deleted
6. Use the keys Shift and Arrow Down together to select all rows for deletion
7. Click Delete Row.

Reference:
https://help.salesforce.com/articleView?id=000333120&type=1&mode=1

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Imtiaz PashaImtiaz Pasha
Hi Vinay ,

When i used your suggestion to delete am using below error and its not getting deleted Invalid cross reference id plz helpUser-added image
VinayVinay (Salesforce Developers) 
Try using 

Open classic debug log page and run the following javascript from chrome Dev tools this will Delete All the logs.
 
setInterval(
    function() {
       if (document.querySelector('span[id*="deleteAllStatus.start"]').style.display === 'none') {document.querySelector('input[value="Delete All"]').click()}
    }
    ,250);

Thanks,