A tight fitting bungie cord should do the trick. I put a garbage can in the back of my truck on it's side and the lid stays on with a bungie cord, even when it's full of yard waste.
Are these indoor garbage cans? I keep mine under the kitchen sink so the dogs have no access. There are many inexpensive cans with locking lids if you choose not to. If they are outdoor cans & your dogs have access you can also buy inexpensive cans with locking lids. Mine only cost 10. each. The bungee cord is a good idea too.
Spray bug spray on the cans. One small lick or taste and the dogs will leave it alone. We use to have this problem years and years ago. Where do you all live where dogs are allowed to roam? It is against the law to let your dogs run. We live sort of in the country and the "roaming" during the last 15 years around here has stopped, because, people will call the law.
Do not harm the dogs under any circumstance. It is not the fault of the dog. If it has an owner, go through the law. If not, call animal control and get it trapped and taken away. Remember they are not targeting you, they are just trying to survive!
ThriftyFun is one of the longest running frugal living communities on the Internet. These are archives of older discussions.
I got tired of putting my plastic trash bags on the curb on trash night and the dog across the street rummaging through everything and spreading trash all over the place. I put a stop to that by putting Tabasco sauce on the outside of the bag after setting it on the curb.