Uncooked? Still wrapped in original cryo or...?
From a few days to a week or a bit more, depending on packaging, fridge temp, possible temp abuse during shipping or at the retailer, etc.
Raw butts, like most raw foods, will spoil safe, i.e., they will spoil before they become unsafe to cook and consume.
Cooked butts, like most cooked foods, are different. Since spoilage organisms were killed during cooking, along with the pathogens, recolinization takes time. Meanwhile, any pathogens (Staph. aureus would be the concern, mostly, but others are possible) that started to colonize would not have much in the way of spoilage organisms to compete with (because of cooking). This sets up the scenario that enables pathogens to grow to a point where food safety is an issue.
It is hard to say how long cooked butts can last. Most cooked food is figured in terms of a few days, tops, to be on the safe side. Much depends on how the food was handled post cooking: how it was cooled, how long, storage temps, whether it was handled (skin contact) or hit with an errant cough or sneeze.
Cooked food is often more of a food safety concern than is raw food meant to be cooked.