As a prepper I have thought/planned out this scenario in depth.
So, as far as a long gun, the 10/22 would be the rifle of choice as it is light weight, reliable, easy to maintain and .22 ammo can be easy to find and is very light weight as well. It’s primary use would be for small game. In a walking around/ on the move type scenario you won’t be dropping a 100+lb deer or what not to eat. This is a huge waste of resources. You’ll be eating squirrels, rabbits and such, single or 2 meal animals. You probably won’t be shooting at 2 legged varmints as this would draw attention, you should be hiding and traveling at night. You won’t be taking any long shots at these targets.
A handgun, whereas I love my 9 and you may find 9 ammo on the way, once again i default to light weight and an abundance of ammo, the 22lr. For 2 legged varmints, you more than likely will be at a close distance and even a 9 may not stop a threat instantly. The psychology of being hit for humans, is just as powerful in most cases as the physiological trauma, and that can be all that is needed. So any 22lr pistol.