Initially written as a serious science-fiction thriller, Ivan Reitman hired David Diamond and David Weissman to re-write the project as a Ghostbusters (1984)-style comedy. The original writer, Don Jakoby, actually enjoyed the changes so much, he continued working on the film alongside the other writers.
During the lengthy shooting in Page, Arizona, Dan Aykroyd entertained the local folk by carding guests at a bar, unofficially greeting people at Wal-Mart, and visiting locals for a cup of coffee in their homes.
David Duchovny turned down a role in Star Wars: Episode II - Attack of the Clones (2002) to appear in this movie.
Shot in December, DreamWorks asked the locals to delay putting up their Christmas decorations. Following the shoot, DreamWorks paid the city employees overtime to light up the town in time for Christmas.
At the time the film was made no Head & Shoulders product contained selenium sulfide, but the company used the film to introduce their selenium product which was released when the film came out.