First, it's important to note that cockroaches share the same basic needs as most creatures do. Their basic requirements are food, water, and shelter. Given that humans also have these needs, it is common to find cockroaches existing nearby.
Food
German cockroaches and American cockroaches can survive on just about anything, which makes eliminating their sources of food particularly difficult. Uncovered food is a temptation that cockroaches can seldom resist. This tip is especially important to remember during the holiday season, when baked goods and other treats are in anything but short supply.
Water
Although cockroaches can live up to a month without food, they need water at least once every week or two. Sadly for their human companions, just a single drop of water per day will do the trick.
Shelter
They do not require much, but cockroaches do need some sort of shelter. Don't let them make your home theirs!
Add weather stripping around windows and doors. Not only can this help with your electricity bill, but it will also deter cockroaches from making an entry. This goes along with the water section as well. If you have leaky windows, cockroaches may be enticed by the moisture.
Visit https://www.flick.com.au/blog/how-to-get-rid-of-cockroaches/ to know more about How to Get Rid of Cockroaches.