The Active Directory (AD) garbage-collection process performs two vital functions. First, it cleans up deleted objects. When you delete an object in AD, the system doesn't immediately delete the object because when replication occurs, a replication partner would recreate the object. Instead, the system uses a tombstone with a finite lifetime to mark the object as deleted. The tombstone replicates to all domain controllers (DCs), and after it expires, the garbage-collection agent deletes the object.
The garbage-collection process also performs online AD defragementation.
By default this process runs every 12 hours on each DC. However, you can
change this frequency by modifying the attribute garbageCollPeriod under the
path CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,DC=