The Bible and other spiritual text do not mention specifically the killing of cockroaches or other insects as a sin, so there is no hard and definite answer to that question.
Most people would probably not consider killing a cockroach a sin, 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.
It would seem that the motivations for killing the cockroaches would be important 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 it could be considered a sin for a person to do this.
But cockroaches carry disease and bacteria, and it is a health concern to have a cockroach infestation in a human dwelling. If the motivation is simply to provide a safe home for your family, then I would not consider it a sin to kill cockroaches in that circumstance.
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 want to live in an environment that is cleaning 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.