They threw tens of thousands of peanuts at them!
Days of Heaven (1978), directed by Terrence Malick, depicts a locust swarm raging over a wheat field. In what’s considered one of the greatest strokes of 70s practical effects creativity, the director decided to drop thousands of peanut shells from a helicopter while directing the actors to perform backwards. This allowed him to reverse the film, creating the illusion of a locust swarm flying away.
Side note though, one could say that back then they had a very different bar for movie production safety and animal rights…
