This week's book giveaway is in the Programmer Certification forum. We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
You could iterate through all the nodes, add those you want to remove into a separate collection, and afterwards, iterator through that other collection calling remove() on each of them.