That's a tough choice.
It would probably depend at what point I discovered the bug.
If I had been in solitary for a relatively short time - say, a week? - I'd kill it, hands down. Bugs. Eeew. Cockroaches. Double eeew. I'd smash my shoe on that sucker until it was a puddle of green goo in the middle of the floor.
But if I'd been in solitary for a couple of years, and I was desperate and lonely and probably more than a little cabin crazy, I'd keep it as a pet and probably name it Larry. (Larry seems appropriate for a cockroach, don't you think?) I'd tell Larry all about the novel I was writing (because what else would I do if incarcerated?) and he could tell me about his adventures on the floor.
It'd be grand.