I've been dealing with a bear problem in my area recently, and last night was no different.
Around 11PM or so last night, I heard a noise and looked outside my window and there was a bear who tipped over my garbage can and tried to take the trash that was in it. I yelled "Hey!" at the bear and then it ran off with whatever it could take. Afterwards I walked outside, cleaned up the mess and picked up the can that was tipped over. No more than a hour or so later, the bear came back, tipped the can over again and tried to steal more trash. I yelled again at the bear and it ran away with more garbage.
Then this morning, I walked around and found my trash in some nearby woods, cleaned it up and then put it back in my trash can. Afterwards I put ammonia inside and outside my trash can to keep the bears away. It worked before, and I'm certain that it will work again. Man, what a rough night it was for me!