The film is Independence Day (1996), directed by Roland Emmerich.
He plays Captain Steven Hiller, a Marine F/A-18 pilot whose charisma, skill, and sheer luck make him humanity's best hope.
A massive alien mothership deploys city-destroying vessels worldwide. Hiller survives the initial onslaught, captures an alien pilot, and teams up with cable technician David Levinson (Jeff Goldblum) to infiltrate the mothership. Their plan: upload a computer virus to disable the shields, then nuke the mothership from inside. Hiller's iconic line after punching the alien—"Welcome to Earth!"—became an instant cultural touchstone.
The aliens are a locust-like hive mind stripping planets of resources—not explicitly called "scum of the universe," but the sentiment fits.
Independence Day: Resurgence (2016) brought back Goldblum and others, but Will Smith did not return (his character died off-screen).