We show that in any separable Banach space containing $c_0$ which admits a $C^k$-smooth bump, every continuous function can be approximated by a $C^k$-smooth function such that its derivative avoids a prescribed $K_\sigma$ set.