The question of whether killing a cockroach is a sin is open to interpretation depending on one’s individual perspective and belief system. The Bible, Koran, and other spiritual books do not mention specifically the killing of cockroaches or other insects as a sin in their texts. So there is no definite or easy answer to that question.
Cockroaches are pest that spread bacteria and can cause sickness and disease in people. Therefore, most people would not consider killing a cockroach a sin because it might be necessary to do so to protect the health of you and your family.
But it is up to each individual to make that determination for himself, following his own conscience and taking into account the guidelines set forth by his preferred religious text. In other words, you will need to follow your own conscience in regards to this issue because it is not directly commented on or discussed in most spiritual books.
I would argue that your personal motivation for killing roaches would be the most important aspect in determining whether or not it is a sin. If for example, one wants to kill them merely for pleasure and enjoyed watching the cockroach suffer, then yes, of course, it could be considered a sin to do this. If the motivation is simply to rid the home of disease carrying pests and provide for the safety of your family, then I would not consider it a sin to kill cockroaches.
Personally, I feel it is good and right to not kill any living thing unless it is threatening your well-being and therefore necessary. Having cockroaches in my home is a circumstance that I feel makes it necessary for me to exterminate them. Although I don’t like to do it, I feel I have the moral right to do so. Of course, everyone will have to make their own decision on that issue.
Do you feel regret or dread when killing cockroaches? Because you are researching this issue, your conscience may have some issues with it. It is natural to feel a sense of regret when killing another living being, even cockroaches. If you feel a sense of trepidation in the act, it is normal. But understand that it is also normal to need to live in an environment that is clean and conducive to good health as well.
So take all this into account and make a decision for yourself on the matter. I would not consider it a sin unless you are deriving some kind of twisted pleasure out of killing the cockroaches. In other words, unless you are a psychopath who derives sadistic pleasure from torturing roaches, I don’t think it is a sin to kill them in a way that is as humane as possible.