  The plasmoid instability has revolutionized our understanding of magnetic
reconnection in astrophysical environments. By preventing the formation of
highly elongated reconnection layers, it is crucial in enabling the rapid
energy conversion rates that are characteristic of many astrophysical
phenomena. Most of the previous studies have focused on Sweet-Parker current
sheets, which, however, are unattainable in typical astrophysical systems.
Here, we derive a general set of scaling laws for the plasmoid instability in
resistive and visco-resistive current sheets that evolve over time. Our method
relies on a principle of least time that enables us to determine the properties
of the reconnecting current sheet (aspect ratio and elapsed time) and the
plasmoid instability (growth rate, wavenumber, inner layer width) at the end of
the linear phase. After this phase the reconnecting current sheet is disrupted
and fast reconnection can occur. The scaling laws of the plasmoid instability
are \emph{not} simple power laws, and depend on the Lundquist number ($S$), the
magnetic Prandtl number ($P_m$), the noise of the system ($\psi_0$), the
characteristic rate of current sheet evolution ($1/\tau$), as well as the
thinning process. We also demonstrate that previous scalings are inapplicable
to the vast majority of the astrophysical systems. We explore the implications
of the new scaling relations in astrophysical systems such as the solar corona
and the interstellar medium. In both these systems, we show that our scaling
laws yield values for the growth rate, wavenumber, and aspect ratio that are
much smaller than the Sweet-Parker based scalings.
