How/when to stop swaddling?

The only way I feel baby calms down enough to sleep is to swaddle. He’s 2 months old. He flails his arms and knocks out his pacifier if we don’t swaddle.. how and when can I stop swaddling?