Let's not forget that sometimes it's entirely the vendor's fault. Motorola has a feature, and forgive me, I SHOULD know what it's called, maybe personality lock? that when enabled restricts the radio to being read and programmed only from computers that are authorized to program that radio.
I've encountered a lot of XTS3000s that were legitimately sold at a county surplus auction, had this feature, were still programmed, still live on the system, and could NOT be deprogrammed due to that rather poorly conceived feature.
What could be done with those radios? Options were limited.
Send them to the Motorola depot for deprogramming (and remove that feature while you're at it. It's nothing but trouble.) $$$ spent if they'll even do it. They might not. They might consider the radios stolen property and cause trouble. That would require the selling agency to have to jump in and say "Yeah we sold those at auction. But because of this problem we're reclaiming them. We can't have those live radios out in the wild."
Get the radio shop that originally programmed them to wipe them. They may or may not do it. Probably depends on whether or not the system managers understand the problem and are willing to be helpful.
Junk the radios.
Seek alternative means of correcting the problem. Things not spoken of here.
In the case of the radios I encountered, I was very lucky to have established a positive and productive conversation with the radio shop that had programmed them for that county as well as the agency that owned them. I shipped those radios to that shop, they deprogrammed them free of charge, and sent them back to me. It only cost me shipping one way. And that agency improved its radio retirement procedures so that it's less likely to happen in the future. All radios to be retired go thru the radio shop for proper deprogramming and reset to the factory default test codeplug.