When a house is not livable it's called uninhabitable or even unlivable and if a house get's official shut down by the local government the house is called condemned.
A house can become unlivable if it lacks running water, sewer connections, natural gas or propane, electricity or has a collapsed roof, shingles falling off, severe leaky roof, faulty wiring or bad plumbing.
However while the city and county and government state a house is unlivable due to no natural gas or propane, no electricity and no running water or sewer or septic, the house is technically livable, as many people for years have gotten by without electricity, running water, sewer or septic or natural gas or propane for heat and have also gotten by with no indoor toilets or plumbing.
It's just the law that says that the house is not livable in those cases.
If the house is severe enough, the house can be condemned and even eventually demolished by the city if they get a court order to do so and they go through the legal process.
A home is legally considered uninhabitable if it poses a severe threat to the occupants' health, safety, or basic physical needs. W
While specific laws vary by state and municipality, local housing and health codes generally require the property to provide:
Essential Utilities: Running hot and cold water, functioning electricity, and adequate heating.
Sanitation: A working indoor toilet, bathtub/shower, and proper sewage disposal.
Structural Integrity: A weatherproof roof, sturdy walls, and safe floors without major hazards.
Safety and Security: Functioning locks on doors and windows, and compliance with fire codes (e.g., working smoke detectors).
Pest and Health Control: Freedom from severe pest infestations (rats, roaches, bedbugs) and dangerous environmental hazards like toxic mold, lead paint, or gas leaks.