Because there is no atmosphere on the moon, and hence no erosion, the Apollo astronauts’ footprints, roverprints and spaceship prints will stay preserved on the moon for at least the next 10 to 100 million years.
They won’t stay on there forever, though. The Moon is exposed to bombardment by meteorites that could easily wipe out a footprint on the moon. The Moon is also exposed to solar wind and over time this acts almost like weather on Earth to scour surfaces on the moon, but the process is very, very slow. Slowly over time, first the tracks will disappear — they will all be ground into and mixed into the soil.
From past studies of moon rocks collected by astronauts during the Apollo missions, researchers have learned that the rocks erode at a rate of about 0.04 inches every 1 million years.