I needed to reinstall XCode on our Developer Transition System (P4-based Mac) to confirm a problem, when I was at home. I didn't want to deal with VNC, so the wizards on #fink gave me the missing incantations.

To uninstall the Developer Tools: sudo perl /Developer/Tools/uninstall-devtools.pl

To mount the XCode 2.2.1 disk image: hdiutil attach -noverify xcode_2.2.1_8g1165_018213632.dmg. Normally I would have used open xcode_2.2.1_8g1165_018213632.dmg, which mounts it with Disk Utility.app, but I wasn't logged in, so Disk Utility couldn't launch.

To actually install XCode from the disk image: sudo installer -verbose -target / -pkg /Volumes/Xcode\ Tools/XcodeTools.mpkg