Body: <p>I have a bunch of contacts with two addresses. Each of their addresses is a different type (home, main, billing, etc). For these contacts, the billing address is primary. </p>
  
  <p>I'd like to delete the billing addresses from the system and have the remaining address for each contact be left as the primary address. </p>
  
  <p>I know how to do this one-by-one, but with more than 1,000 records to do I'd like a way to automate this. I have ID numbers for every contact that needs this change. Any ideas? </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-19T17:53:00.063Z
Comments.Text: How are your php skills? You could write a small script with the API to do that.
Comments.UserDisplayName: Aidan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-20T09:23:59.643Z
Comments.Text: do you have access to your Civicrm database?
Comments.UserDisplayName: Ramesh - ARTECH Consultancy
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-28T20:54:23.017Z
Comments.Text: Keep in mind that if you have front-end financial transactions, those contacts will once again have billing addresses when/if they submit any of your payment pages.  Is the main problem that the billing addresses are the primary?  Or that there are multiple addresses (which will happen over time in Civi)?
Comments.UserDisplayName: Lesley Carter - BackOffice
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-14T19:30:01.733Z
Comments.Text: @elizabeth did you figure this out? looking to do the same thing
Comments.UserDisplayName: Yossi
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-28T19:46:28.180Z
Comments.Text: See also: https://civicrm.stackexchange.com/questions/26162/mass-deletion-of-bad-addresses
Comments.UserDisplayName: Laryn
Tags: <contacts><addresses>
Title: How to delete addresses (and only addresses) for multiple contacts?
ThreadText: # How to delete addresses (and only addresses) for multiple contacts?
  
  (Asked by: username_0 on 2017-12-19)
  
  I have a bunch of contacts with two addresses. Each of their addresses is a different type (home, main, billing, etc). For these contacts, the billing address is primary.
  
  I'd like to delete the billing addresses from the system and have the remaining address for each contact be left as the primary address.
  
  I know how to do this one-by-one, but with more than 1,000 records to do I'd like a way to automate this. I have ID numbers for every contact that needs this change. Any ideas?
  
  **Tags:** contacts, addresses
  
  > **Comments:**
  > **username_1**: How are your php skills? You could write a small script with the API to do that.  
  > **username_2**: do you have access to your Civicrm database?  
  > **username_3**: Keep in mind that if you have front-end financial transactions, those contacts will once again have billing addresses when/if they submit any of your payment pages.  Is the main problem that the billing addresses are the primary?  Or that there are multiple addresses (which will happen over time in Civi)?  
  > **username_4**: @username_0 did you figure this out? looking to do the same thing  
  > **username_5**: See also: https://civicrm.stackexchange.com/questions/26162/mass-deletion-of-bad-addresses  
  
  ---
  
  ## 0 answers
  
  