Things You'll Need
Spray bottle with bleach or ammonia and water
Spray bottle with liquid soap and water
You can avoid the aggravation of tipped-over garbage cans and trash strewn across the yard, as well as small crawly things in your cans. A bit of prevention can keep your trash intact until it's hauled off, protected by in a clean and secure trashcan. Particularly if you have raccoons in the neighborhood, you'll need to work to deter their explorations of your trash.
Put trash in bags and tie the bags shut. Spray the can when you put the trash out with bleach or ammonia diluted in water. Don't overfill cans such that the lid won't fully shut.
Push the lid on as tightly as possible. To deter large pests such as raccoons or dogs, place a heavy rock on top or keep the lid on with a bungee cord or piece of rope so that even tipping it over won't spill the contents. Or use a trash can designed so the handles push up and lock the lid in place.
Place petroleum jelly under the lip of the trashcan to keep crawling pests from getting inside.
Keep your garbage can clean. Wash it out as needed with a soapy solution with added ammonia or vinegar.
Avoid leaving foods in the garbage can for days on end. If you can keep food scraps -- especially seafood shells and meat bones and scraps -- in the freezer until trash day, it lessens your pest problems considerably.