If you are Performing package cleanup,this query might help you to Identify how many packages with no advertisements(standard advertisement and Task Sequence) so you know What action to Take next! select  v_Package.PackageID, v_Package.Name,v_Package.SourceVersion,v_Package.SourceDate from dbo.v_package Where packageID not in (select PackageID from dbo.v_Advertisement)and PackageID not in (SELECT ReferencePackageID FROM v_TaskSequenceReferencesInfo) and v_Package.name not like '%osd%'…
SCCM report Count packages with no advertisements

This blog post will help you to identify packages (count) for which there is no advertisement created and not used these packages in any task sequence.Once you have the packages ,you can further take action whether you really need these packages to exist in SCCM or cleanup to save disk space and avoid unused packages…