During a core-collapse supernova (SN), axionlike particles (ALPs) could be produced through the Primakoff process and subsequently convert into $gamma$ rays in the magnetic field of the Milky Way. We do not find evidence for such a $gamma$-ray burst in observations of extragalactic SNe with the Fermi Large Area Telescope (LAT). The SN explosion times are estimated from optical light curves and we find a probability of about $sim$90% that the LAT observed at least one SN at the time of the core collapse. Under the assumption that at least one SN was contained within the LAT field of view, we exclude photon-ALP couplings $gtrsim 2.6times10^{-11}$GeV$^{-1}$ for ALP masses $m_a lesssim 3times 10^{-10}$ eV, within a factor of $sim 5$ of previous limits from SN1987A.