Roy DuBro (Karim Prince) and Ed Klingbottom (Thomas F. Wilson) are garbage men who are constantly undermined by their corrupt boss Junior Assistant Dispatcher Trainee Stanley Snyder (M. Emmet Walsh).
One day, Earth is secretly invaded by an army of flying saucers, commanded by a Darth Vader-esque alien called Glaxxon (Dave Fennoy). A saucer abducts the two men and the aliens on board attempt to vivisect them. They awaken just in time and escape back to Earth with an alien fire extinguisher. When they arrive late for work and try to tell Stanley about the aliens, he doesn't believe them, having heard every alien story ever from fellow worker Old Bob (Don Stroud).
President Smith (Barry Bostwick) and his significantly more competent press secretary (Donna D'Errico) receive news about the invasion from General Vice (George Kennedy) and the President tells his advisor, Dr. Strangemeister (Wigald Boning), to find two people with alien experience and make them into secret agents. Unbeknownst to anyone, Strangemeister is secretly in league with Glaxon, who is infuriated by Ed and Roy's interference. Strangemeister hires the two of them, believing they are destined to fail and transforms them into 'The Men in White'.
The aliens start abducting people all over the world. Roy suggests the two of them use a cow as bait. The plan works and they successfully capture an alien spaceship. They discover a device that makes them forget the last several seconds, and the two of them get stuck in a continuous loop for several hours.
After a brief musical number, Strangemeister convinces the President to make a broadcast assuring the remaining humans that they are safe. Meanwhile, the device runs out of battery power and the two men are freed from the memory-erasure loop. The two discover a weapon on the ship called the "Illudium PU-36 Explosive Space Modulator" and take it. They also fuel their garbage truck with Dylythium Blend from the spaceship's engine, enabling it to fly.
Roy uses the Modulator to destroy the invading saucers. Strangemeister combats this by telling the president that they intend to use the Modulator to take over the world. Glaxon sends four bounty hunters to destroy the two heroes and at the same time, the president sends in the Special Forces (including a cowboy, an Indian, a fencer and a group of girl scouts) to do the same. Ed and Roy are chased into a factory and manage to elude both forces, which in turn start attacking each other. In the confusion, the Modulator overloads and destroys the bounty hunters, with all the humans escaping just in time.
Glaxon, on Strangemeister’s suggestion, uses the mother ship’s main weapon to destroy every garbage truck on the planet. Ed and Roy escape by flying into outer space. They overcome a series of obstacles and make their way towards the mother ship. The president addresses the press and is then taken to the war-room, in an underground bunker. The generals and Strangemeister join them soon after. Ed and Roy board the mother ship and crawl through the air ducts to the computer room.
While Ed hacks into the computer and installs a self-destruct virus, Roy wrestles with Glaxon and ultimately defeats him by launching him into space. With the virus uploaded, all the on-board humans and aliens make their way to the escape pods a good ten seconds before the ship explodes. Ed and Roy land in a swimming-pool. Unable to comprehend being defeated by garbage men, Strangemeister exposes his true intentions to the President and reveals that he was actually a tiny man (Ben Stein) inside a robotic humanoid suit who was shrunken in a sauna by an alien.
To reward them for their success, the President promotes the two heroes to 'Senior Assistant Dispatcher Trainees' and demotes Stanley who is forced to pick up the trash for everyone on the planet (as all the other garbage trucks were destroyed). The two reconcile with Bessie the cow and the film ends.