to follow the gaps diet, eliminate grains, sugar, soy, pasteurized dairy, starchy vegetables, and processed foods from the diet. the diet is restrictive and may take up to 2 years to complete.