<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Best approach for bulk deleting unreferenced Software Models with no entitlements? in SAM forum</title>
    <link>https://www.servicenow.com/community/sam-forum/best-approach-for-bulk-deleting-unreferenced-software-models/m-p/3564231#M21188</link>
    <description>&lt;DIV&gt;&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;We have a requirement to bulk delete around &lt;STRONG&gt;65k Software Models&lt;/STRONG&gt; that appear to be safe cleanup candidates.&lt;/P&gt;&lt;P&gt;The deletion criteria is:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Software Model has &lt;STRONG&gt;no entitlements&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Software Model has &lt;STRONG&gt;no references in any related/reference table&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Only models created by approved system/service accounts are in scope&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Since Software Models can be referenced across multiple tables, we want to avoid direct bulk deletion and use a controlled, auditable approach.&lt;/P&gt;&lt;P&gt;The strategy we are considering is:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Identify safe delete candidates once&lt;/STRONG&gt;&lt;BR /&gt;Run a read-only script to find Software Models with no entitlements and no references.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Store candidates in a staging/control table&lt;/STRONG&gt;&lt;BR /&gt;Store Software Model sys_id, display name, created by, created date, validation status, and backup data.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Delete from the staging table in controlled batches&lt;/STRONG&gt;&lt;BR /&gt;Process only records marked as safe/pending, using a configurable batch size.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Track status per record&lt;/STRONG&gt;&lt;BR /&gt;Mark each record as Pending, Deleted, Skipped, or Failed.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Produce summary reporting&lt;/STRONG&gt;&lt;BR /&gt;Report total scanned, safe candidates, deleted count, skipped count, failed count, and reference reasons.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;This would make the cleanup resumable and auditable instead of manually running many individual batches.&lt;/P&gt;&lt;P&gt;Has anyone implemented a similar bulk Software Model cleanup?&lt;BR /&gt;Is this staging/control-table approach recommended, or is there a better/simple pattern for safely deleting a large volume of unreferenced Software Models?&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 25 Jun 2026 03:03:57 GMT</pubDate>
    <dc:creator>pavan Punna</dc:creator>
    <dc:date>2026-06-25T03:03:57Z</dc:date>
    <item>
      <title>Best approach for bulk deleting unreferenced Software Models with no entitlements?</title>
      <link>https://www.servicenow.com/community/sam-forum/best-approach-for-bulk-deleting-unreferenced-software-models/m-p/3564231#M21188</link>
      <description>&lt;DIV&gt;&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;We have a requirement to bulk delete around &lt;STRONG&gt;65k Software Models&lt;/STRONG&gt; that appear to be safe cleanup candidates.&lt;/P&gt;&lt;P&gt;The deletion criteria is:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Software Model has &lt;STRONG&gt;no entitlements&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Software Model has &lt;STRONG&gt;no references in any related/reference table&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Only models created by approved system/service accounts are in scope&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Since Software Models can be referenced across multiple tables, we want to avoid direct bulk deletion and use a controlled, auditable approach.&lt;/P&gt;&lt;P&gt;The strategy we are considering is:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Identify safe delete candidates once&lt;/STRONG&gt;&lt;BR /&gt;Run a read-only script to find Software Models with no entitlements and no references.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Store candidates in a staging/control table&lt;/STRONG&gt;&lt;BR /&gt;Store Software Model sys_id, display name, created by, created date, validation status, and backup data.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Delete from the staging table in controlled batches&lt;/STRONG&gt;&lt;BR /&gt;Process only records marked as safe/pending, using a configurable batch size.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Track status per record&lt;/STRONG&gt;&lt;BR /&gt;Mark each record as Pending, Deleted, Skipped, or Failed.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Produce summary reporting&lt;/STRONG&gt;&lt;BR /&gt;Report total scanned, safe candidates, deleted count, skipped count, failed count, and reference reasons.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;This would make the cleanup resumable and auditable instead of manually running many individual batches.&lt;/P&gt;&lt;P&gt;Has anyone implemented a similar bulk Software Model cleanup?&lt;BR /&gt;Is this staging/control-table approach recommended, or is there a better/simple pattern for safely deleting a large volume of unreferenced Software Models?&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 25 Jun 2026 03:03:57 GMT</pubDate>
      <guid>https://www.servicenow.com/community/sam-forum/best-approach-for-bulk-deleting-unreferenced-software-models/m-p/3564231#M21188</guid>
      <dc:creator>pavan Punna</dc:creator>
      <dc:date>2026-06-25T03:03:57Z</dc:date>
    </item>
  </channel>
</rss>

