how ton remove perticular cubes from the scene

hi ,some one please help me i just created a scene with with 100’s of cubs …now i just want to delete some of the cubes based on some property .is there any standard procedure to remove the items from scene?please help me with some psudo code

Give some more information .Based on what property do you remove the cube.

Thanks for your reply swetha i want to delete the cubes which are present in the z=1.0f location…one more for small values of x and y co ordinates i am able see the cubs …for an example x values in between 0 to 100 i am able to see for higher values of x i am unable to see they are adding but my window is showing upto x =100.
how to set view to see those ares also

dont draw the cubes for which z value is 1.0