# Deleting Duplicate Instances in Revit

**URL:** <https://forum.dynamobim.com/t/deleting-duplicate-instances-in-revit/115296>\
**Category:** Revit\
**Tags:** revit, dynamo\
**Created:** [October 22, 2026, 12:39pm UTC](https://forum.dynamobim.com/t/deleting-duplicate-instances-in-revit/115296 "2026-10-22T12:39:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![badisabah.abbasly](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@badisabah.abbasly](https://forum.dynamobim.com/u/badisabah.abbasly)\
**Post date:** [October 22, 2026, 12:39pm UTC](https://forum.dynamobim.com/t/deleting-duplicate-instances-in-revit/115296/1 "2026-10-22T12:39:15Z")

</div>

Hey, i am working on a dynamo code where it finds and deletes the duplicate instances from an error message.  
This is the code, but here is the issue: If there are 4 same instances on the same place, it just deletes one of them and keeps the other 3. To reduce the number to 1 instance, i need to run it multiple times. Could someone help me to fix this issue, please?  
I appreciate all feedbacks, thank you.  
P.S: Revit version is 2026.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/2/e2ef46e5c5ef1e9272b77768b2324f295ad57300.png)

---

<div class="post-metadata">

**Author:** ![BimAmbit](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bimambit/32/192629_2.png) [@BimAmbit](https://forum.dynamobim.com/u/BimAmbit)\
**Post date:** [October 22, 2026, 1:25pm UTC](https://forum.dynamobim.com/t/deleting-duplicate-instances-in-revit/115296/2 "2026-10-22T13:25:11Z")

</div>

iirc Lists.DuplicateItemIndices gives you lists of index of duplicates, like`[[0,3,4], [5,9,12] ]`. then you List.Map with List.RestOfItems to get `[3, 4], [9, 12]` excluding 0 and 5. And then List.GetItemAtIndex to obtain the elements and remove them.

and be careful with this kind of location comparison, floating point precision can lead to false positive.
