In this talk I will consider the problem of determining the maximal density of sets in Euclidean space which avoid some given distances, in the sense that there should be no two points in the set at the given distances. To find upper bounds for the maximal density we use the Fourier coefficients of the auto correlation function of the characteristic function of a distance avoiding set together with linear programming. This method is related to the linear programming bound for sphere packings due to Henry Cohn and Noam Elkies. I give two applications of our bound: In dimensions 2, ..., 24 we compute new upper bounds for the density of sets avoiding the unit distance, which results into new lower bounds for the measurable chromatic number of Euclidean space. Then, we have a new, simple proof of a recent result by Boris Bukh concerning sets avoiding many distances. His proof resembles the famous regularity lemma of Szemeredi. Furthermore, it implies a result by Furstenberg, Katznelson, Weiss, proved by ergodic theoretic methods, that every planar set of positive density realizes all distances which are large enough. This is joint work with Fernando M. de Oliveira Filho.