Consider $B=\{b_1,b_2,\dots\}\subset \{2,3,\dots\}$ such that its elements are pairwise relatively prime and the sum of their reciprocals is finite. E.g., we can take for $B$ the set of squares of all primes. To $B$ we associate a two-sided 0-1 sequence $\eta$, by setting $\eta(n):=0$ whenever $b_i | n$ for some $b_i\in B$ and $\eta(n):=1$ otherwise. The closure of the orbit of $\eta$ under the shift is denoted by $X_\eta$ and it is called the B-free subshift. I will describe the set of all invariant probability measures on $X_\eta$. The talk is based on a joint work with M. LemaƄczyk and B. Weiss.