Yes, storing the components in airtight containers is the best way to keep bugs away from your essentials, including flour mites, grain weevils, and pantry moths.