If you have mice, the most effective way to keep them out of your trash cans is by using cans with tight-fitting lids. Metal cans with tight-fitting lids are the best because a mouse can still smell food, even in a sealed can, and will chew a hole in the plastic. They cannot chew through aluminum and other metal cans which keeps them away.