  We prove that for any dimension function $h$ with $h \prec x^d$ and for any
countable set of linear patterns, there exists a compact set $E$ with
$\mathcal{H}^h(E)>0$ avoiding all the given patterns. We also give several
applications and recover results of Keleti, Maga, and M\'{a}th\'{e}.
