Diatomaceous earth, food grade, they will need to come in contact with it.
We have 2 indoor dogs and just set off roach bombs and sprayed around the outside with Home Defense. Just took up toys and food bowls, and took them with us for the,4 hours. No problems, just dead bugs. Haven't seen any since.
This is supposed to work for many pests, including roaches... We has gnats and mosquitos... but I'd imagine treating the exterior of your house as well as the interior is going to be necessary. For the gnats and mosquitos, we concentrated on the exterior. We did two things and it's helped tremendously! First we sprayed our house where they seemed to be gathering... the soffits and facias, the foundation and on the walls of the exterior where they were the most with THIS PRODUCT. (It says it will last 12 months and will keep lots of other insect critters away as well) The first few days we saw tons of dead gnats on the porches and patios, but now they're just gone. BTW, I did call the company to be sure it wouldn't harm birds etc. if they ate the dead bugs, and they said it wouldn't.
Then we also sprinkled THIS ALL NATURAL PRODUCT through all the foundation plantings and most of the yard, concentrating closer to the house. It will repel mosquitos, ticks, fleas, chiggers etc. Amazing difference!! I was getting eaten alive just watering, now there are very few if any mosquitos biting me. Love it!!
There are some safe ways for sure to do this.
Call an exterminator and take your pets to a friend, family member or neighbor for a few days. You will never ever truly be rid of them if you don't. Home remedies never work because they hide and breed in places you can't get to.