What is the best way to wean my 24 month old from the pacifier? He mostly uses it at night and for naps.

Wean pacifier. Starting at 12 months , take the pacifier away from the child while awake and gradually work on teaching him to use a different transitional object at night, such as a blankie or stuffed animal.
Slow destruction. Start by putting a small hole in the end of the nipple and enlarging the hole every few days. It won't take long before they get frustrated enough to drop the pacifier. Make sure you do this to all the pacifiers they have -- even those that they have hidden.