  In this paper, we consider a variant of Tur\'an's problem on the distance
from an integer polynomial in $\mathbb{Z}[x]$ to the nea\-rest irreducible
polynomial in $\mathbb{Z}[x]$. We prove that for any polynomial $f \in
\mathbb{Z}[x]$, there exist infinitely many square-free polynomials $g\in
\mathbb{Z}[x]$ such that $L(f-g) \le 2$, where $L(f-g)$ denotes the sum of the
absolute values of the coefficients of $f-g$. On the other hand, we show that
this inequality cannot be replaced by $L(f-g) \le 1$. For this, for each
integer $d \geq 16$ we construct infinitely many polynomials $f \in
\mathbb{Z}[x]$ of degree $d$ such that neither $f$ itself nor any $f(x) \pm
x^k$, where $k$ is a non-negative integer, is square-free. Polynomials over
prime fields and their distances to square-free polynomials are also
considered.
