Given a set of axis-aligned rectangles in the plane, this paper presents an algorithm for the removal of rectangle containment as well as rectangle enclosures. That is, given a query rectangle R q , this algorithm removes all rectangles R k , . . . , R l from the rectangle set that are contained in R q . It also removes R q if there is a rectangle R j that encloses R q . The algorithm, initially implemented for rectangle spline generation using rectangles as building blocks, is fast, easy to implement and maintain, it can be run on parallel machines such as GPUs at no extra cost, but it requires extra memory to store the rectangle indexes for quick access and space partitioning.