# Question: Unloading A Reference Hier /w Parents

**URL:** https://forum.highend3d.com/t/question-unloading-a-reference-hier-w-parents/3614
**Category:** Maya
**Tags:** mel
**Created:** [September 13, 2005, 3:11am UTC](https://forum.highend3d.com/t/question-unloading-a-reference-hier-w-parents/3614 "2005-09-13T03:11:56Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![nonquad](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/n/eb9ed0/32.png) [@nonquad](https://forum.highend3d.com/u/nonquad)
#### Post date: [September 13, 2005, 3:11am UTC](https://forum.highend3d.com/t/question-unloading-a-reference-hier-w-parents/3614/1 "2005-09-13T03:11:56Z")

</div>

Maya 6.0.1  
fileA contains pCube1  
fileB references fileA, and groups fileA:pCube1  
fileC references fileB

new file  
create reference to fileC   
file -f -rr fileC;

// Error: Node 'fileC:fileB:fileA:pCube1' is parented to an object being removed. //  
// Error: Node 'fileC:fileB:fileA:pCubeShape1' is parented to an object being removed. //  
// Error: This reference cannot be removed. Possibly items from another file are parented to items from this file. //

I can hack around this by doing an import/delete cycle rather than trying to kill reference, but I'd rather not, as doing so would bring in undeletable nodes (lightlinkers mostly).   
In this particular context, I'm viewing fileC across a reference \_specifically\_because\_ I want a simple and thorough way to eject the contents when I'm done analyzing them.

any ideas?  
sorry if this is a well-covered subject... the forum is a mess of dead icons for me right now, making search results a bit yucky to sift through.

---

<div class="post-metadata">

### Author: ![nonquad](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/n/eb9ed0/32.png) [@nonquad](https://forum.highend3d.com/u/nonquad)
#### Post date: [September 14, 2005, 12:11am UTC](https://forum.highend3d.com/t/question-unloading-a-reference-hier-w-parents/3614/2 "2005-09-14T00:11:47Z")

</div>

On further investigation:

It appears that the reference can be removed if the hierarchy is first unloaded. Starting with the leaves, prune the structure back, unloading one file at a time, until only the root (or nothing at all) remains loaded. At that point, the top-level reference should accept removal peacefully.
