Clear Users from Debug logs using SOQL in Salesforce

Follow below steps in Production/Sandbox/Developer Organization if you see the too many users added in debug logs
Setup -> Administration Setup -> Monitoring -> Debug Logs

1. Go to Developer Console (Your name -> Developer Console)
2. Click on ‘Query Editor’ tab
3. Run this query with ‘Use Tooling API’ checked and click ‘Execute’: SELECT ID FROM TraceFlagClear-User-from-debug-logs
4. This should return some records. Select all records and click ‘Delete Row’
5. Repeat 3 and 4 until you are left with 1 or 2 records and check back in debug logs. Most of the users must be cleared now

Written by 

I am Sakthivel Madesh, a certified Salesforce Advanced Developer & Administrator working on Salesforce Technology since 2011. I am currently working in Techforce Services as Sr. Salesforce Developer. I have worked on multiple technologies Like PHP, Java, Salesforce, I am very passionate about Salesforce and to earn 15x Salesforce Certification. I love Trailhead for learning Salesforce Skill and Become a Trailhead 5x Ranger too. I Love to Learn & Share my Salesforce knowledge to Salesforce Learners/Beginner using My Blog and Salesforce Community.

Leave a Reply

Your email address will not be published. Required fields are marked *