The answer in general is no. Nakamura has constructed <a href="http://projecteuclid.org/euclid.jdg/1214432677">here</a> (pp.90, 96-99, solvmanifolds of type III-(3b)) an example of a compact complex (non-K&auml;hler) manifold $M$ with $TM$ holomorphically trivial (so in particular $K_M$ is holomorphically trivial) which has arbitrarily small deformations $M_t$ with negative Kodaira dimension.

On the other hand, if $M$ is compact K&auml;hler with $K_M$ holomorphically trivial, then its sufficiently small deformations $M_t$ are K&auml;hler (Kodaira-Spencer) and still have $K_{M_t}$ holomorphically trivial. Indeed, we have $c_1(K_{M_t})=0$ in $H^2(M_t,\mathbb{Z})$ (a topological condition), so by the Calabi-Yau theorem they admit Ricci-flat K&auml;hler metrics $g_t$. On the other hand $\dim H^0(M_t,K_{M_t})=h^{n,0}(M_t)$ is locally constant hence equal to $1$, so you have a nontrivial holomorphic section $\Omega_t$ of $K_{M_t}$. A Bochner formula gives $\Delta_{g_t}|\Omega_t|^2_{g_t}=|\nabla \Omega_t|^2_{g_t},$ which can be integrated on $M_t$ to see that $\Omega_t$ is parallel with respect to $g_t$, hence it must be nowhere vanishing. This gives you a holomorphic trivialization of $K_{M_t}$.