Here is a link to the repair guides for your computer. Select the fan you want to remove and follow the guide. Good luck. http://www.ifixit.com/Device/iMac_G5_17%22_Model_A1058#deviceGuides
open