An old problem of Moser asks: what is the size of the largest union-free subfamily that one can guarantee in every family of m sets? A family of sets is called union-free if there are no three distinct sets in the family such that the union of two of the sets is equal to the third set. We show that every family of m sets contains a union-free subfamily of size at least [[sqrt 4m+1]] - 1 that this bound is tight. This solves Moser’s problem and proves a conjecture of Erdos and Shelah from 1972. More generally, a family of sets is a-union-free if there are no alpha + 1 distinct sets in the family such that one of them is equal to the union of a others. We determine up to an absolute multiplicative constant factor the size of the largest guar...