The cleargraphics (cg) command does 2 things:

  1. it sends the turtle to its home position in the centre of the work area [0 0]
  2. it clears all the graphics from the page

The graphics are:

  • any images or backgrounds that have been stamped, or
  • any graphics drawn by the turtle when its pen is down (pendown or pd)

Turtles, or turtles wearing shapes given by the setshape (setsh) command will not be erased. They are not graphics. See What's the Difference Between a Turtle Wearing a Shape and a Stamped Image?