Antilife shell

Antilife shell is an abjuration spell that creates a ten-foot field that hedges out all living creatures.

Effect
You bring into being a mobile, hemispherical energy field that prevents the entrance of most sorts of living creatures. The effect hedges out animals, aberrations, beasts, magical beasts, dragons, fey, giants, humanoids, monstrous humanoids, oozes, plants, shapechangers, and vermin, but not constructs, elementals, outsiders, or undead. (See the Monster Manual for an explanation of creature types.)

Note: This spell may be used only defensively, not aggressively; forcing an abjuration barrier against creatures whom the spell keeps at bay collapses the barrier.