  We study the deformation theory of $\mathrm{G}_2$-instantons on nearly
$\mathrm{G}_2$ manifolds. There is a one-to-one correspondence between nearly
parallel $\mathrm{G}_2$ structures and real Killing spinors, thus the
deformation theory can be formulated in terms of spinors and Dirac operators.
We prove that the space of infinitesimal deformations of an instanton is
isomorphic to the kernel of an elliptic operator. Using this formulation we
prove that abelian instantons are rigid. Then we apply our results to describe
the deformation space of the canonical connection on the four normal
homogeneous nearly $\mathrm{G}_2$ manifolds.
