  We study the deconfinement phase transition in $ (2+1) $-dimensional
holographic $ SU(N) $ gauge theories in the presence of an external magnetic
field from the holographic hard and soft wall models. We obtain exact solutions
for the critical temperature of the deconfinement transition for any range of
magnetic field. As a consequence, we find a critical magnetic field $(B_c)$, in
which the critical temperature $(T_c)$ vanishes; for $B<B_c$ we have an inverse
magnetic catalysis and for $ B>B_c $ we have a magnetic catalysis.
