We report a search for nine lepton-number-violating (LNV) and three lepton-flavor-violating
(LFV) neutral charm decays of the type $D^0\rightarrow h^{\prime-}h^{-}l^{\prime+}l^+$ and $D^0\rightarrow h^{\prime-}h^+ l^{\prime\pm}l^{\mp}$, where $h$ and $h^{\prime}$ represent a $K$ or $\pi$ meson and $l$ and $l^{\prime}$ an electron or muon. The analysis is based on $468$ fb$^{-1}$ of $e^+e^-$ annihilation data collected at or close to the $\Upsilon(4S)$ resonance with the BaBar detector at the SLAC National Accelerator Laboratory. No significant signal is observed, and we establish 90\% confidence level (C.L.) upper limits on the branching fractions in the range $(1.0 - 30.6)\times 10^{-7}$. The limits are between one and three orders of magnitude more stringent than previous measurements.