Not using mealworms in your compost is a great way to keep darkling beetles out of your garden. You also want to clean up fallen leaves and other garden debris that the beetles might lay their eggs in. Placing your compost bin far away from your main growing area will also help.