{"id":244,"date":"2026-08-04T09:00:13","date_gmt":"2026-08-04T16:00:13","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/insidemsix\/?p=244"},"modified":"2026-08-04T14:41:02","modified_gmt":"2026-08-04T21:41:02","slug":"remove-is-not-uninstall","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/insidemsix\/remove-is-not-uninstall\/","title":{"rendered":"Remove Is Not Uninstall"},"content":{"rendered":"<p>Just as https:\/\/devblogs.microsoft.com\/insidemsix\/there-is-no-install-its-stage-and-register\/ explained that <em>Install<\/em> is not truly an installation operation in MSIX, <em>Remove<\/em> is similarly not an uninstall operation.<\/p>\n<p>This can be surprising &#8211; sometimes even alarming &#8211; to developers coming from traditional installer technologies such as MSI, where uninstalling software typically implies:<\/p>\n<ul>\n<li>binaries are deleted<\/li>\n<li>directories are removed<\/li>\n<li>registry entries are cleaned<\/li>\n<li>runtime artifacts are purged<\/li>\n<\/ul>\n<p>In MSIX, that model simply does not exist.<\/p>\n<h2>Remove = Deregister + (Maybe) Destage<\/h2>\n<p>From MSIX Deployment&#8217;s perspective, a package lifecycle consists of four fundamental operations:<\/p>\n<ul>\n<li><strong>Stage<\/strong> &#8211; acquire and securely place the payload on disk<\/li>\n<li><strong>Register<\/strong> &#8211; associate the package with a user<\/li>\n<li><strong>Deregister<\/strong> &#8211; remove the package association for a user<\/li>\n<li><strong>Destage<\/strong> &#8211; remove the package payload from disk<\/li>\n<\/ul>\n<p>There&#8217;s a symmetry here. Stage and Register do the work necessary to make a package available for use. Deregister and Destage unwind that work, first removing the package from use and ultimately removing it from the system.<\/p>\n<p>Interestingly, the deployment API doesn&#8217;t provide <code>DeregisterPackageAsync()<\/code> or <code>DestagePackageAsync()<\/code>. Instead, there is only <code>RemovePackage*Async()<\/code><sup>1<\/sup>.<\/p>\n<p>&#8220;Remove&#8221; is the public abstraction over unwinding a package&#8217;s lifecycle, as far as the system can safely go.<\/p>\n<p>There is no <a href=\"https:\/\/learn.microsoft.com\/uwp\/api\/windows.management.deployment.deploymentoptions\">ForceTargetApplicationShutdown<\/a> option for <code>Remove*()<\/code> APIs. Instead, remove operations effectively behave as though the option existed and is always enabled. Running processes using the package may be shut down or terminated so the servicing operation can proceed.<\/p>\n<p>If the package is no longer in use, Deployment deregisters it and, when appropriate, destages it.<\/p>\n<p><em>When appropriate.<\/em><\/p>\n<h2>Deregistration Is Guaranteed, Destaging Is Conditional<\/h2>\n<p>A package removal operation does <strong>not<\/strong> necessarily delete the package payload from disk.<\/p>\n<p>Instead, the operation primarily focuses on removing the package&#8217;s registrations and system integrations:<\/p>\n<ul>\n<li>removing user-specific registrations<\/li>\n<li>disconnecting Start Menu entries<\/li>\n<li>revoking file type associations<\/li>\n<li>updating runtime metadata<\/li>\n<li>releasing MSIX-managed application data<\/li>\n<li>deleting an internal reference to the package<\/li>\n<li>destaging the package <strong>IF<\/strong> no remaining references exist<\/li>\n<\/ul>\n<p>From the user&#8217;s perspective, the application is gone.<\/p>\n<p>From the operating system&#8217;s perspective, however, the package may still be present on disk\u2014available for, and possibly in use by, other users.<\/p>\n<p>That distinction is crucial to understanding why <em>Remove<\/em> is not the same thing as <em>Uninstall<\/em>.<\/p>\n<p>Remove always unwinds registrations. Deletion of the package payload is conditional.<\/p>\n<p>But if we&#8217;ve just deregistered the package, what references are left?<\/p>\n<p>As it turns out, quite a few.<\/p>\n<p>That&#8217;s a tale for Part 2&#8230;<\/p>\n<hr \/>\n<p><sup>1<\/sup> Remove comes in several variants, including <a href=\"https:\/\/learn.microsoft.com\/uwp\/api\/windows.management.deployment.packagemanager\">PackageManager<\/a>&#8216;s <a href=\"https:\/\/learn.microsoft.com\/uwp\/api\/windows.management.deployment.packagemanager.removepackageasync\">RemovePackageAsync()<\/a> and <a href=\"https:\/\/learn.microsoft.com\/windows\/windows-app-sdk\/api\/winrt\/microsoft.windows.management.deployment.packagedeploymentmanager\">PackageDeploymentManager<\/a>&#8216;s <a href=\"https:\/\/learn.microsoft.com\/windows\/windows-app-sdk\/api\/winrt\/microsoft.windows.management.deployment.packagedeploymentmanager.removepackagebyfamilynameasync\">RemovePackageByFamilyNameAsync()<\/a>. These provide variations of scoping what to remove, but otherwise their functionality is the same.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just as https:\/\/devblogs.microsoft.com\/insidemsix\/there-is-no-install-its-stage-and-register\/ explained that Install is not truly an installation operation in MSIX, Remove is similarly not an uninstall operation. This can be surprising &#8211; sometimes even alarming &#8211; to developers coming from traditional installer technologies such as MSI, where uninstalling software typically implies: binaries are deleted directories are removed registry entries are cleaned [&hellip;]<\/p>\n","protected":false},"author":911,"featured_media":81,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[8,2,5,15,4,10],"class_list":["post-244","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-msix","tag-architecture","tag-msix","tag-register","tag-remove","tag-stage","tag-terminology"],"acf":[],"blog_post_summary":"<p>Just as https:\/\/devblogs.microsoft.com\/insidemsix\/there-is-no-install-its-stage-and-register\/ explained that Install is not truly an installation operation in MSIX, Remove is similarly not an uninstall operation. This can be surprising &#8211; sometimes even alarming &#8211; to developers coming from traditional installer technologies such as MSI, where uninstalling software typically implies: binaries are deleted directories are removed registry entries are cleaned [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/insidemsix\/wp-json\/wp\/v2\/posts\/244","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/insidemsix\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/insidemsix\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/insidemsix\/wp-json\/wp\/v2\/users\/911"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/insidemsix\/wp-json\/wp\/v2\/comments?post=244"}],"version-history":[{"count":1,"href":"https:\/\/devblogs.microsoft.com\/insidemsix\/wp-json\/wp\/v2\/posts\/244\/revisions"}],"predecessor-version":[{"id":247,"href":"https:\/\/devblogs.microsoft.com\/insidemsix\/wp-json\/wp\/v2\/posts\/244\/revisions\/247"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/insidemsix\/wp-json\/wp\/v2\/media\/81"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/insidemsix\/wp-json\/wp\/v2\/media?parent=244"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/insidemsix\/wp-json\/wp\/v2\/categories?post=244"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/insidemsix\/wp-json\/wp\/v2\/tags?post=244"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}