We get garbage bears in the yard all the time during the summer, even with bear proof garbage cans and no bird feeders...they love the seed.
In my youth, I was managing a condo complex with big dumpsters. Everynight, a big black bear would crawl in the dumpster and make a big mess. I finally decided I would sleep in my Subaru parked next to the dumpster, and when the bear came and crawled in, would toss a M-80 firecracker into the dumpster and scare him off for good.
All went well, late at night I woke up with the noise of the bear getting into the dumpster
....I rolled down the window of the Subaru very quietly
...lit the M-80
...and a stupid cat jumped into the Subaru's window scaring the crap out of me and causing me to drop the M-80 in the passenger seat.
Needless to say, I couldn't hear for a week, the passenger seat was blasted to shreds...and the bear and the cat were never seen again.