The Lévy flight foraging hypothesis states that organisms must have evolved adaptations to exploit Lévy walk search strategies. Indeed, it is widely accepted that inverse square Lévy walks optimize the search efficiency in foraging with unrestricted revisits (also known as nondestructive foraging). However, a mathematically rigorous demonstration of this for dimensions D ≥ 2 is still lacking. Here we study the very closely related problem of a Lévy walker inside annuli or spherical shells with absorbing boundaries. In the limit that corresponds to the foraging with unrestricted revisits, we show that inverse square Lévy walks optimize the search. This constitutes the strongest formal result to date supporting the optimality of inverse square Lévy walks search strategies.