Hard Delete record using Apex in Salesforce

We can hard delete record or list of records using emptyRecycleBin() function in apex. Pass the record or record list to emptyRecycleBin() to delete it from Recycle Bin.

Contact con = new Contact(Id = '09k110000O5abc');
Database.emptyRecycleBin(con);

Note: The DML operation datatbase.emptyRecycleBin() is limited to 1000 items.

  • arpit sethi

    Hello Biswajeet,

    Thanks for sharing your knowledge. I do refer your blog most of the times. Can you please update this article since limit of 200 records is not correct, it is 10,000. It may be possible it was 200 when you wrote this Article.

    Thanks,
    Arpit Sethi
    https://www.linkedin.com/in/arpitsethi89/