Answers.Body: <p>Since you are using Drupal, you can install the CiviCRM Entity module, and use Views Bulk Operations to create a View that will delete contacts, or any CiviCRM data in a Drupal Batch API process</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-14T04:52:12.813Z
Answers.Text: You'll need the submodule CiviCRM Entity Actions enabled as well
Answers.UserDisplayName: jackrabbithanna
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-14T04:50:26.893Z
Answers.LastActivityDate: 2018-01-14T04:50:26.893Z
Answers.UserDisplayName: jackrabbithanna
Body: <p>I've a list of 8K+ CiviCRM contacts that have been deemed spam/unwanted. I am looking to clear them from CiviCRM, along with their related Drupal users. </p>
  
  <p>I've found and tested this module: <a href="https://www.drupal.org/project/userdelete" rel="nofollow noreferrer">https://www.drupal.org/project/userdelete</a> which will allow me to plug in a list of email addresses, arrived at from joining my list of contacts to the civicrm_uf_match table. </p>
  
  <p>My question is, what is the path of least resistance to handle a clean removal of the CiviCRM contacts? </p>
  
  <p>The API explorer seems to indicate that the contact delete method will only take a single contact id at a time, which would force me to write a module or a rest client to iterate through my list.</p>
  
  <p>Would simply updating the CiviCRM DB directly with is_deleted = 1 do the trick?   </p>
  
  <p>I imagine this isn't a new situation...</p>
  
  <p>Thanks in advance for your feedback. </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-01-14T04:33:07.403Z
Comments.Text: Have you tried Search functionality such as "Find Contacts", "Advanced Search", etc? You can find delete contact in the action menu. Also see https://civicrm.stackexchange.com/questions/4518/how-do-i-bulk-delete-contacts?rq=1
Comments.UserDisplayName: jitendra - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-01-14T22:08:10.397Z
Comments.Text: The spam contact list has been compiled via some complex logic and conditions directly via SQL query, the list is not something I can just plug in to a basic GUI search.
Comments.UserDisplayName: Derek
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-01-15T09:18:33.663Z
Comments.Text: You can add a temporary tag / group with an import from their CiviCRM IDs to make them searchable in the GUI.
Comments.UserDisplayName: Thomas Schüttler
Tags: <contacts><delete>
Title: Bulk Delete of Spam Contacts and related Drupal Users
ThreadText: # Bulk Delete of Spam Contacts and related Drupal Users
  
  (Asked by: username_0 on 2018-01-13)
  
  I've a list of 8K+ CiviCRM contacts that have been deemed spam/unwanted. I am looking to clear them from CiviCRM, along with their related Drupal users.
  
  I've found and tested this module: <https://www.drupal.org/project/userdelete> which will allow me to plug in a list of email addresses, arrived at from joining my list of contacts to the civicrm\_uf\_match table.
  
  My question is, what is the path of least resistance to handle a clean removal of the CiviCRM contacts?
  
  The API explorer seems to indicate that the contact delete method will only take a single contact id at a time, which would force me to write a module or a rest client to iterate through my list.
  
  Would simply updating the CiviCRM DB directly with is\_deleted = 1 do the trick?
  
  I imagine this isn't a new situation...
  
  Thanks in advance for your feedback.
  
  **Tags:** contacts, delete
  
  > **Comments:**
  > **username_1**: Have you tried Search functionality such as "Find Contacts", "Advanced Search", etc? You can find delete contact in the action menu. Also see https://civicrm.stackexchange.com/questions/4518/how-do-i-bulk-delete-contacts?rq=1  
  > **username_0**: The spam contact list has been compiled via some complex logic and conditions directly via SQL query, the list is not something I can just plug in to a basic GUI search.  
  > **username_2**: You can add a temporary tag / group with an import from their CiviCRM IDs to make them searchable in the GUI.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2018-01-14. Score: 2
  
  Since you are using Drupal, you can install the CiviCRM Entity module, and use Views Bulk Operations to create a View that will delete contacts, or any CiviCRM data in a Drupal Batch API process
  
  > **Comments:**
  > **username_3**: You'll need the submodule CiviCRM Entity Actions enabled as well  
  
  ---
  
  