Do you have to smog your car before you sell it?

Depends on which state you live in.

Not neccessarily. It may very from state to state and some states actually require full safety inspection as opposed to smogging but in Nevada (unless you're a dealer) you are not required to smog a vehicle prior to sale but the person who buys it will have to pass a smog inspection before they can register it with DMV.