In recent years there has been a growing interest in sp-carbon chains as possible novel nanostructures. An example of sp-carbon chains are the so-called polyynes, characterized by the alternation of single and triple bonds that can be synthesized by pulsed laser ablation in liquid (PLAL) of a graphite target. In this work, by exploiting different solvents in the PLAL process, e.g. water, acetonitrile, methanol, ethanol, and isopropanol, we systematically investigate the solvent role in polyyne formation and stability. The presence of methyland cyano-groups in the solutions influences the termination of polyynes, allowing to detect, in addition to hydrogen-capped polyynes up to HC22H, methyl-capped polyynes up to 18 carbon atoms (i.e. HCnCH3) and cyanopolyynes up to HC12CN. The assignment of each species was done by UV-Vis spectroscopy and supported by density functional theory simulations of vibronic spectra. In addition, surface-enhanced Raman spectroscopy allowed to observe differences, due to different terminations (hydrogen, methyl-and cyano group), in the shape and positions of the characteristic Raman bands of the size-selected polyynes. The evolution in time of each polyyne has been investigated evaluating the chromatographic peak area, and the effect of size, terminations and solvents on polyynes stability has been individuated.