It's usually not a good idea as the hinge mortises are very unlikey to match up. Hanging a new door in an old jamb sometimes isn't the way to go. Try a prehung door unit.