The short answer is: keep the bin dry, seal anything that can rot, and clean the bin more often than you think you need to. In summer, smell comes from moisture, food scraps, and heat, so the goal is to break that chain.
Start by separating wet waste from dry waste. If your city requires organic collection, use a small countertop container with a tight lid and empty it daily. Keep food scraps in the freezer until pickup if you can, or line the container with newspaper and a compostable bag. For regular trash, put smelly food packaging in a sealed bag, squeeze out the air, and tie it off. Don’t toss liquids, milk, or soup into the bin—pour them down the drain or into a sealed container first.
Use bin liners correctly. A sturdy liner that fits tightly protects the bin, but it won’t stop odor if liquids leak. Add an absorbent layer at the bottom: baking soda, cat litter, or charcoal. Baking soda is cheap and works well; sprinkle it in the bin and inside the liner. Charcoal briquettes in a breathable bag also help.
Clean the bin regularly. Once a week, rinse it with warm water and a little dish soap or vinegar, scrub the bottom and corners, then let it dry completely in the sun before putting in a new liner. Vinegar is good for killing odor-causing bacteria, and sunshine helps dry out moisture. If the bin is close to your apartment, wipe the lid and handle too—they get greasy.
Keep the lid closed and the bin out of direct sun if possible. In cities, you usually can’t choose the pickup spot, but you can keep the lid latched and avoid leaving bags open on top. Don’t let trash sit for extra days; empty it before it gets full, especially in a heat wave. If you have a balcony, keep the bin in the shade and let it air out after cleaning.
Finally, deal with pests early. Flies and maggots mean something is exposed. Rinse recyclables, especially jars and cans, and keep the area around the bin swept. A few minutes of prevention each day beats a horrible smell later. It’s not glamorous, but dry waste, sealed scraps, absorbent powder, and a weekly wash make a huge difference.