A Sonogashira cross-coupling, nucleophilic substitution and elimination cascade reaction allows the synthesis of otherwise difficult to obtain linear dienynes, in moderate to high yields. Ionic liquids are suitable recyclable solvents for the reaction. This synthetic strategy opens new ways to prepare highly conjugated alkenes and alkynes.