This is not a trivial task since Splunk does not record when each KO is used. Some are easy to determine - scheduled searches, reports, and alerts, for example. You should be able to use the audit log to find uses of dashboards and unscheduled saved searches. Others, like macros, aliases, and tags will be more challenging. It will require parsing every executed search (find them in _audit) and identifying the KOs in each. That will produce a list of *used* KOs. From that, you can derive a list of unused objects.
... View more