I live an old apartment building and discovered a month into my lease that my apartment has a mouse problem. No matter how may times I bait or trap, I have no luck. It it appears that this might be because the mice live under the floorboards and between apartments, darting in and out of holes in my hardwood floor around every radiator, the cabinet beside my gas stove, and the toilet. If I make it bad for them, cleaning and putting out traps, they just leave, only to come back once I get lazy or leave anything out they might eat or hide inside. The holes themselves are decent sized, around an inch on the radiator and 2-4 inches on the toilet and cabinet. Shining a flash-light into them lets me see down into the floorboards and it looks like they might all be connected, at least to the mice. Management doesn't care, I can't just move, and I'm done almost stepping on mice when I finish my morning shower. Is expanding foam my best bet here? Are there any other options?
Expanding foam can get messy but it may be your best bet, if you can keep it in place and they do not chew through it.
You may want to either incorporate a heavy gauge metal mesh wire, neatly cut around or into the place the mice go through. You might could even "bed" the wire mesh in the foam as it is expanding to lock in place that way. Doing this will make a potentially messy task and make it even messier.
This will not look nice in any sense of the word on the larger holes but it will certainly slow them down for a while. Otherwise a cat, as mentioned in the comments section, will also take care of the problem.
Thin sheet metal screwed in place will work as well without the foam too. You could try nailing it down, but in the cabinet it will bounce a bunch, screws are better here.
Steel wool in any openings will completely prevent them from entering. Works like a charm!