# Bulk remove association

**URL:** <https://community.hubspot.com/t/bulk-remove-association/60837>\
**Category:** HubSpot Ideas\
**Tags:** object\
**Created:** [July 12, 2022, 11:09pm UTC](https://community.hubspot.com/t/bulk-remove-association/60837 "2022-07-12T23:09:36Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![jjones41](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@jjones41](https://community.hubspot.com/u/jjones41)\
**Post date:** [August 21, 2023, 6:12pm UTC](https://community.hubspot.com/t/bulk-remove-association/60837/11 "2023-08-21T18:12:08Z")

</div>

I had a similar need and wrote a code to accomplish it. If your HubSpot edition allows custom code in workflows, you could use bulk associations to create the associations to Company B and then use a workflow to remove the associations to Company A. The code assumes you want to remove _all_ associations to Company A. In my case, I wanted to remove all but 3, so I removed them all with the code and then manually added back the three I needed.  
You can [find the code and direction on how to use it here](https://github.com/jjonesfbs/HubSpot_Resources/tree/0ce2360ee03f18bdeebea41613cf46363a0a8a7f). So long as you have or can create a private key, you’ll be able to do this no problem. It’s very simple and straightforward. Hope it helps.

---

_[View the full topic](https://community.hubspot.com/t/bulk-remove-association/60837)._
