# Removing ranks from trees

**URL:** <https://speciforum.org/t/removing-ranks-from-trees/2710>\
**Category:** Get Help\
**Created:** [July 15, 2025, 7:48pm UTC](https://speciforum.org/t/removing-ranks-from-trees/2710 "2025-07-15T19:48:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nfshoobs](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/nfshoobs/32/3979_2.png) [@nfshoobs](https://speciforum.org/u/nfshoobs)\
**Post date:** [July 15, 2025, 7:48pm UTC](https://speciforum.org/t/removing-ranks-from-trees/2710/1 "2025-07-15T19:48:56Z")

</div>

Hey all,  
Specify 7.10.2.3  
I am trying to remove some taxon tree ranks to simplify our taxon tree, as in practice they are more of a hindrance than a help. (In this case, the Subclass, Infraclass, and Superorder ranks).

 ![Screenshot 2025-07-15 at 3.39.30 PM](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/8/8cf27ee5b27307d320aca0ea880c8d42743c5d20.jpeg)

I removed all child taxa from the ranks using the Taxon move tool to have a parent of higher rank (Class) and removed all taxon records at the intermediate ranks in question.  
When I try to remove the ranks using the edit tool, the tree still alerts me that all determinations and taxa in the database reference those ranks, even though the ranks have no records at all anymore.

 ![Screenshot 2025-07-15 at 3.43.18 PM](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/a/a3e55f33d04948a7baee08f302adc06514cb4555.jpeg)

The documentation here: [Editing Tree Definitions / Ranks](https://speciforum.org/t/editing-tree-definitions-ranks/1783) suggests that once the taxa have been removed, the tree definition item should be removable. It’s been a few days since I removed the taxa, so I don’t think it’s just that the tree is taking time to update.  
Am I missing something? How do I remove these ranks?

---

<div class="post-metadata">

**Author:** ![Elizabeth](https://avatars.discourse-cdn.com/v4/letter/e/34f0e0/32.png) [@Elizabeth](https://speciforum.org/u/Elizabeth)\
**Post date:** [July 16, 2025, 4:25pm UTC](https://speciforum.org/t/removing-ranks-from-trees/2710/2 "2025-07-16T16:25:19Z")

</div>

Hi @nfshoobs,

It looks like the delete is blocked as it’s trying to delete the rank itself and everything lower in the tree and the ranks below it have nodes in them. I was able to recreate this issue and have submitted a report on GitHub which you can review here:

> <https://github.com/specify/specify7/issues/7102>
>
> \*\*Describe the bug\*\*
> In the taxon tree if you try to delete a rank that is not t…he very last rank in the tree, the deletion is blocked saying that the rank is referenced by taxon even if the rank is empty. You can delete a tree rank in any other tree without any problems in 7.11 but deleting a taxon rank is only working in 7.9.6.2 and broken by 7.10.  
> 
> From Nate Shoobs on \[Discourse\](https://speciforum.org/t/removing-ranks-from-trees/2710):
> 
> \> I removed all child taxa from the ranks using the Taxon move tool to have a parent of higher rank (Class) and removed all taxon records at the intermediate ranks in question. 
> \> When I try to remove the ranks using the edit tool, the tree still alerts me that all determinations and taxa in the database reference those ranks, even though the ranks have no records at all anymore. 
> \> \<img width="1035" height="576" alt="Image" src="https://github.com/user-attachments/assets/d4b068dc-bda0-4f10-8105-eca138d7f8eb" /\>
> 
> 
>  
> 
> \*\*To Reproduce\*\*
> Steps to reproduce the behavior:
> 
> 1. Go to a Taxon tree 
> 2. Add a new rank that is not the last rank in the tree 
> 3. Try to delete the new rank 
> 4. See error
> 
> 
> \*\*Expected behavior\*\*
> You should be able to delete any rank that does not contain any nodes. 
> 
> \*\*Screenshots\*\*
> 7.10.2.3:
> 
> https://github.com/user-attachments/assets/8ae451ae-75d3-4e24-95a1-330d617e9567
> 
> 
> 7.9.6.2: 
> 
> https://github.com/user-attachments/assets/cb98039a-763f-46e1-ba9f-57b304c5c456
> 
> 
> 
> Please fill out the following information manually:
> \- OS: Windows 11
> \- Browser: Chrome
> \- Specify 7 Version: Goes back to at least 7.10 
> \- Database Name: kufish
> \- Collection name: KU Fish Voucher
> \- User Name: spfishadmin
> \- URL: https://kufish20250716-v71023.test.specifysystems.org/specify/

Thank you for bringing this to our attention!

---

<div class="post-metadata">

**Author:** ![nfshoobs](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/nfshoobs/32/3979_2.png) [@nfshoobs](https://speciforum.org/u/nfshoobs)\
**Post date:** [July 16, 2025, 4:42pm UTC](https://speciforum.org/t/removing-ranks-from-trees/2710/3 "2025-07-16T16:42:20Z")

</div>

Hey @Elizabeth, thanks for the reply! Interesting to see this is genuinely a bug, I totally thought I was just doing something wrong!  
Thanks for the writeup on github.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/1/18a843c97bc32b40e8ad0e035755bc88ffaacaf7.svg) [@system](https://speciforum.org/u/system)\
**Post date:** [July 23, 2025, 4:42pm UTC](https://speciforum.org/t/removing-ranks-from-trees/2710/4 "2025-07-23T16:42:55Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
