There comes a point in every cook’s life when you realize you have a spice problem. Usually that happens when you’re in the midst of a recipe and you’re searching for a certain spice only to end up sliding jars this way, bottles that way before a flimsy plastic bag of bay leaves tumbles out into your sink to meet its ruin in a pot you’ve left to soak.

It doesn’t have to be like this. You can organize your spices and dried herbs (and perhaps even the rest of your pantry) so that you know exactly what you have and where. The rewards of this rainy day project are many: You won’t be as overwhelmed by mess. You will become a more efficient cook. And you will waste less.

This is not a guide to creating an Instagram-perfect, uniform spice cabinet. The ultimate goal is to find an organizational method that works for you.

• Find out what you have and what needs to go. Spread out all of your spice and herb containers on a table or counter. Examine the age of each tin or jar. The general guideline for how long to keep spices is about six to eight months for ground, a year or two for whole and several years for certain sturdy spices such as whole nutmeg and cinnamon sticks.

• Smell the contents, cautiously. Remember, these are potentially sneeze-inducing. What you’re looking for is a discernible scent. If the spice has one, keep it. If the scent or taste is dusty or off in any way, toss it. That mustiness can seep into whatever you’re cooking.

• Once you’ve done your inventory, choose an organizing method to match your space and personality. Do you have Type A tendencies? Alphabetizing and a spreadsheet to catalog might be nice. Are you more of a visual person? Perhaps color-coding is the way to go. Out of sight, out of mind? Move those spices front and center, and you’ll be less likely to forget about them.

• To make your spices more visible, buy a small wire or mesh shelf to add another level on which to stack spices. This is especially useful in cabinets, where spices tend to clutter together and become messy. Or use a quarter-sheet pan to store the spices on a low shelf, so that you can easily remove all of the spices in one go. Be sure to label the top of the spice jars. Buy a few magnetic spice tins to stick to the side of your refrigerator. These are best for whole spices — peppercorns, caraway seeds, bay leaves — rather than powders.

• Go down a few online organizing rabbit holes and decide whether you’d like to go all-in and make a spice system with coordinating jars, or if you can be more relaxed and use whatever containers you’ve got to make it work. The only right way is the way that works for you.

• Remember that “organization is all in service of use,” according to Ethan Frisch, co-founder of spice company Burlap & Barrel. He keeps spices in large plastic containers, with the regularly used ones on top and the less frequent ones on the bottom. “I set it up intentionally so that if there’s something I want to be cooking with more, I put it up in the front so that I see it and know that it’s there.” Similarly, when something seems to be getting old, seek out cooking projects to use up that spice.

• Consider the source. If you buy from a supermarket, chances are the spices have taken a time-consuming journey from being harvested and processed to landing in your cart. Spice shops or brands that advertise the harvest dates will almost certainly provide a fresher product. “Really, you should pay attention to the flavor and how you like it. Spices don’t improve with age, so you should use them as quickly as possible,” Frisch says.

• Consider quantity. The bulk section can be a good place to purchase just the amount you need, rather than, say, an apocalyptic-size Costco container. Experiment to find an organizational system that works, and don’t be afraid to change it up as you go. After all, you’re bound to get a new specialty blend that needs a home in no time.