The present invention relates to a cap assembly for a drug delivery device, comprising:a cap body (12) adapted to releasably engage with a housing of the drug delivery device and being further adapted to receive a needle assembly to be releasably interconnected with said housing,an ejector unit movably arranged on the cap body at least along the bodys long axis and having mechanical transmission means adapted to transfer axial movement of the ejector unit to the needle assembly for ejecting the needle assembly from the cap body.