Skip to content
SCCM How to Remove Orphan Packages from Child Sites ConfigMgr

SCCM How to Remove Orphan Packages from Child Sites ConfigMgr

Written By Anoop C Nair
Last Updated August 7, 2024
Posted In SCCM
SHARE

Today, I will explain to SCCM How to Remove Orphan Packages from Child Sites ConfigMgr. I just thought of sharing one of the TechNet discussions regarding removing Orphan Packages from the child sites.

Packages deleted at a parent site can be orphaned at a child site if the child site is down at the time of deletion (temporarily) or the replication process is unsuccessful.

How to Remove Orphan Packages from Child Sites

You won’t delete those packages from the child site because they appear “locked” in the console. In this case, we must manually fix the problem by modifying the package record from the child site database to allow the package deletion from the child site console.

SCCM How to Remove Orphan Packages from Child Sites ConfigMgr - Fig.1
SCCM How to Remove Orphan Packages from Child Sites ConfigMgr – Fig.1

Steps to Remove Orphan Packages from Child Sites

To remove orphan packages from the SQL Server database, use the following steps:

Patch My PC
  • Open SQL Server Management Studio and use the site database of the child site cs1(SMS_cs1).
  • Type and run the following command in the query window:
    • Select PkgId, Name, SourceSite from SMSPackages
  • Search for the PkgID file that you want to remove:
    • You should be able to find this package due to this query. If the PkgID is not found, it shouldn’t have been displayed in the cs1 console in the first place – close and re-open the cs1 SCCM console if this is the case.
  • Type and run the following command in the query window:
    • Update SMSPackages Set SourceSite=’cs1′ Where PkgID= ”
  • The package is now set to a local one, and you can delete it from the SCCM Administrator console.
    • Please delete it from the cs1 console, and then the deletion will be gracefully replicated to all sites below cs1 as if it were packages created on the child site.

Resources

We are on WhatsApp. To get the latest step-by-step guides and news updates, Join our Channel. Click here –HTMD WhatsApp.

Author

Anoop C Nair is Microsoft MVP! He is a Device Management Admin with more than 20 years of experience (calculation done in 2021) in IT. He is a Blogger, Speaker, and Local User Group HTMD Community leader. His primary focus is Device Management technologies like SCCM 2012, Current Branch, and Intune. He writes about ConfigMgr, Windows 11, Windows 10, Azure AD, Microsoft Intune, Windows 365, AVD, etc.

Written by

Anoop C Nair is Workplace Technology solution architect with 25+ years of experience in global enterprise organizations such as JP Morgan, Capgemini, etc. Microsoft Certified Trainer. Microsoft MVP from 2015 onwards for consecutive 11+ years! He also conducts Intune and modern workplace tech training for enterprise organizations. He is Blogger, Speaker, and Founder of HTMD Community and HTMD Conference. His main focus is on Device Management technologies like Intune, Windows, Cloud PC. He writes about technologies like Intune, SCCM, Windows, Cloud PC, Windows, Entra, Microsoft Security.

Discussion · 2 comments

  1. How would I remove drivers that got imported but then the sql database got restored to a time before they were imported, now it wont reimport them? how do i clean up orphaned invisible drivers?

Join the discussion

Your email address will not be published. Required fields are marked *

Related guides

Intune

Windows 11 KB5101650 KB5099414 July 2026 Patch and 3 Zero Day Vulnerabilities and 570 Flaws

Key Takeaways Windows 11 KB5101650 KB5099414 July 2026 Patch and 3 Zero Day Vulnerabilities and 570 Flaws! In the July 2026 Patch, Microsoft introduced new features designed to improve the overall Windows experience. The update adds enhancements to Windows Update for more flexible update management and introduces Point-in-Time Restore, providing an additional recovery option for […]

AC Anoop C Nair 9 min read
Intune

2026 June KB5094126 KB5093998 Windows 11 Patch | 3 Zero Day Vulnerabilities and 200 Flaws

Key Takeaways 2026 June KB5094126 KB5093998 Windows 11 Patch | 3 Zero Day Vulnerabilities and 200 Flaws! The June 2026 Windows 11 Patch Tuesday update brings several improvements to File Explorer. It adds support for additional archive formats, including UU, CPIO, XAR, and NuGet Packages (NUPKG). The update also preserves View and Sort preferences in […]

AC Anoop C Nair 10 min read
Intune

2026 May KB5089549 KB5087420 Windows 11 Patch | 0 Zero Day Vulnerabilities and 120 Flaws

Key Takeaways The Windows 11 May 2026 Patch KB5089549 KB5087420 Update brings important security fixes, performance improvements, and reliability enhancements across the operating system. The update introduces new features such as Xbox Mode for gaming, File Explorer improvements, enhanced input and sharing experiences, better taskbar and Windows Hello reliability, and additional enterprise management capabilities for […]

AC Anoop C Nair 8 min read
SCCM

ConfigMgr 2603 Introduces New Early Update Enrollment Process

Key Takeaways In this post we are discussing the ConfigMgr 2603 Introduces New Early Update Enrollment Process. Microsoft has officially released Configuration Manager version 2603 to the Early Update Ring, giving organizations an opportunity to test upcoming improvements before the global production rollout. The release is targeted at enterprises running ConfigMgr version 2409 or later […]

AC Anoop C Nair 3 min read