The fan will have two hot wires going to it, usually a black and a red. Pick one, and cap off the other. At the switch end, use the same wire to connect to the dimmer, along with the hot wire. Cap off the unused wire.
Why would you want to remove a ceiling fan, anyways?
