When you’re under stress, or even facing a potential survival situation, the urge to stockpile gasoline can be tempting. But doing so can quickly become dangerous. In fact, our friends over at The Drive argue that it’s never a good idea to buy way more gas than you need. Still, there are ways to store gasoline safely and sensibly—it’s all about moderation and proper conditions.

Red: Regular gasoline. This color is the most common and should hold only pure gasoline that hasn’t been mixed with any other substances.Yellow: Diesel gasoline. This fuel is often used for trucks and other large machinery.Blue: Kerosene. This flammable fuel can be used for cooking stoves and small lamps. It also powers many aircraft.Green: Flammable mixed fuels. If you have lawn equipment that runs on a mixture of gasoline and oil, for example, that mixture should be stored in a green container.

As tempting as it might be in a time of crisis, do NOT store gasoline or other combustible substances in unorthodox containers. Milk jugs, canteens, and other everyday vessels are not built to handle gasoline and could easily spill or leak dangerous fumes. Gasoline also expands when it warms up, meaning you should always heed the maximum fill line on DOT-approved canisters to avoid an overflow.

Store the gasoline in a safe space

Proper containers are only a part of the puzzle: it’s also important to store gasoline and other combustible liquids in secure, well-ventilated areas away from any source of heat or electricity. A cool, dry corner of a locked building away from people is a great spot. If your garage is attached to your house, Bennett adds, that can be an acceptable place to store gasoline—as long as you keep it away from any source of electricity and out of the reach of children and pets. You can also store gasoline outdoors, but it’s best to keep it sheltered from the elements. Any small cracks or leaks in a gas canister can let water seep in, ruining the fuel inside. The gasoline can also leak out and damage the surrounding environment. “Ideally, if you have a detached garage or shed, that is the best place to put it,” says David Bennett, an automotive repair expert at AAA. “Do not store it in the house itself—it could leak, you could have gas fumes if it’s not sealed properly, and it is a flammable liquid, so it’s dangerous, and you don’t want that in your house.” Unlike the food in your pantry, there’s no standard guide to gasoline’s shelf life. One warning sign is smell: expired gasoline lets off a strong, pungent odor that Bennett says is different from the scent that wafts into your nostrils at the gas station. But for those who don’t want to rely on their nose alone, Bennett recommends using a conservative estimate of 30 days to gauge its expiration date.  

Keep only what you need

When you dump expired gasoline, make sure you discard it according to local guidelines. Every municipality has different rules and restrictions on hazardous waste, so your best bet is to research the disposal sites in your area. Usually, you’ll simply need to drop off your unused gas (in its approved container) and let the experts take it from there. And if you don’t have access to the materials and conditions needed to safely store gas, consider making electric machinery and appliances a part of your life. A portable solar panel is an off-the-grid way to juice up your devices during blackouts, and buying an electric vehicle is a foolproof way to ensure gas shortages never leave you worrying about refilling your car.