network discovery information about discovered hosts/services is never cleaned up automatically, and there is no way to clean it manually.
while manual clearing would not be consistent with other entities (events, sessions etc - everything housekeeper deals with), automatic clearing could be performed by the housekeeper.
it could be just a single extra option, taking care of both hosts (dhosts table) and services (dservices table). by default set to 1 year, it would clean out information about hosts that are down for > 1 year - if a host has been up during that period, it would not be removed. service information would only be removed together with hosts, never alone.
housekeeper should probably also clean out any dhost/dservice information when a dhosts entry exists in a network range, not covered by any discovery rule (for example, if the network range of a rule was changed to exclude some addresses).
discovery rule status (enabled/disabled) probably should not affect this - although some users might prefer disable/enable cycle to clear out that information manually.
this issue is a followup of