Potassium hydroxide (KOH) and sodium hydroxide (NaOH) are expected to occur in the atmospheres of hot rocky super-Earth exoplanets but a lack of spectroscopic data is hampering their potential detection. Using robust first-principles methodologies, comprehensive molecular line lists for KOH and NaOH that are applicable for temperatures up to $T=3500$ K are presented. The KOH OYT4 line list covers the 0-6000 cm$^{-1}$ (wavelengths $lambda > 1.67$ $mu$m) range and comprises 38 billion transitions between 7.3 million energy levels with rotational excitation up to $J=255$. The NaOH OYT5 line list covers the 0 - 9000 cm$^{-1}$ (wavelengths $lambda > 1.11$ $mu$m) range and contains almost 50 billion lines involving 7.9 million molecular states with rotational excitation up to $J=206$. The OYT4 and OYT5 line lists are available from the ExoMol database at www.exomol.com and should greatly aid the study of hot rocky exoplanets.