<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/servicing-while-in-use-and-error-packages-in-use-w4gql68ge" -->

---
title: Servicing While In Use and ERROR_PACKAGES_IN_USE | daily.dev
description: MSIX never services (updates, removes, repairs) a package while it&#x27;s in use, and this piece explains the mechanisms available to handle that constraint. By...
canonical: https://daily.dev/posts/servicing-while-in-use-and-error-packages-in-use-w4gql68ge
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Servicing While In Use and ERROR_PACKAGES_IN_USE | daily.dev
og:description: MSIX never services (updates, removes, repairs) a package while it&#x27;s in use, and this piece explains the mechanisms available to handle that constraint. By...
og:url: https://daily.dev/posts/servicing-while-in-use-and-error-packages-in-use-w4gql68ge
og:image: https://api.daily.dev/og/posts/w4gql68gE.png
og:image:alt: Servicing While In Use and ERROR_PACKAGES_IN_USE
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Servicing While In Use and ERROR_PACKAGES_IN_USE

**[DevBlogs](https://daily.dev/sources/devblogs)** · 5 min read · 0 upvotes · 0 comments

## Summary

MSIX never services (updates, removes, repairs) a package while it's in use, and this piece explains the mechanisms available to handle that constraint. By default, a servicing request against an in-use package fails with ERROR_PACKAGES_IN_USE (0x80073D02). Developers can instead force-shutdown the running app via ForceTargetAppShutdown (PackageManager API) or -ForceTargetApplicationShutdown (Add-AppxPackage), or defer the operation: manifest-level uap17:UpdateWhileInUse=defer (requires Windows 11 24H2/build 26100+) or the runtime DeferRegistrationWhenPackagesAreInUse option delay updates until the app is no longer in use, taking precedence over force options. Pending deferred updates can be detected via PackageDeploymentManager.IsPackageRegistrationPending/PendingForUser. Removal has similar deferred behavior through RemovePackageAsync with RemovalOptions.DeferRemovalWhenPackagesAreInUse, with pseudocode illustrating the shutdown/terminate/defer decision logic.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://devblogs.microsoft.com/insidemsix/msix-servicing-while-in-use>

## Questions this post answers

### How do I stop Add-AppxPackage from failing with ERROR_PACKAGES_IN_USE when updating an MSIX package that's currently running?

Use the -ForceTargetApplicationShutdown option with Add-AppxPackage, or set ForceTargetAppShutdown=true on AddPackageOptions when using the PackageManager API. This checks for processes using the target package and shuts them down, forcibly via TerminateProcess() if necessary, to unblock the deployment. Alternatively, defer the update instead of forcing shutdown if the app shouldn't be interrupted.

_daily.dev surfaces deployment API changes like this for developers automating MSIX update pipelines._

### How can I update an MSIX package without forcibly closing the running application?

Set uap17:UpdateWhileInUse to defer in AppxManifest.xml, which requires Windows 11 version 24H2 (build 26100) or later, or pass DeferRegistrationWhenPackagesAreInUse=true to AddPackageOptions for a single deployment request. Windows then delays the update until the package is no longer in use, and this manifest setting overrides force-shutdown options like ForceTargetAppShutdown entirely.

_Developers building update UX around active users can track these MSIX deferral options on daily.dev._

### How can I check if an MSIX package has a deferred update waiting to be applied?

Call PackageDeploymentManager.IsPackageRegistrationPending to check for the current user, or IsPackageRegistrationPendingForUser to check a specific user (requiring admin privilege if that user isn't the caller). Both return true if the package family has a previously deferred update still pending registration.

_daily.dev helps deployment engineers keep up with Windows App SDK APIs like these for MSIX updates._

## Similar posts on daily.dev

- [Package Status](https://daily.dev/posts/package-status-5lg80ij3e) · DevBlogs · 0 upvotes · 0 comments
- [MSIX Per-User vs All Users: Install, Provision, and Uninstall Packages](https://daily.dev/posts/msix-per-user-vs-all-users-install-provision-and-uninstall-packages-hoejsei8v) · DevBlogs · 0 upvotes · 0 comments
- [Applications Are Not Packages](https://daily.dev/posts/applications-are-not-packages-jt1mal77v) · DevBlogs · 0 upvotes · 0 comments

---

Tags: [#windows](https://daily.dev/tags/windows), [#powershell](https://daily.dev/tags/powershell)

[View this post on daily.dev](https://daily.dev/posts/servicing-while-in-use-and-error-packages-in-use-w4gql68ge)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Servicing While In Use and ERROR_PACKAGES_IN_USE","url":"https://daily.dev/posts/servicing-while-in-use-and-error-packages-in-use-w4gql68ge","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/servicing-while-in-use-and-error-packages-in-use-w4gql68ge"},"datePublished":"2026-09-02T13:54:20.776Z","dateModified":"2026-09-02T14:12:12.545Z","description":"MSIX never services (updates, removes, repairs) a package while it's in use, and this piece explains the mechanisms available to handle that constraint. By...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/07a59168c46b96c29b05704ae094667a?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/07a59168c46b96c29b05704ae094667a?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"DevBlogs","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"DevBlogs","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/8f68b453325f482ebeb73fb780092713","url":"https://daily.dev/sources/devblogs"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/servicing-while-in-use-and-error-packages-in-use-w4gql68ge","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"windows,powershell","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"DevBlogs","item":"https://daily.dev/sources/devblogs"},{"@type":"ListItem","position":3,"name":"Servicing While In Use and ERROR_PACKAGES_IN_USE"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/servicing-while-in-use-and-error-packages-in-use-w4gql68ge#faq","mainEntity":[{"@type":"Question","name":"How do I stop Add-AppxPackage from failing with ERROR_PACKAGES_IN_USE when updating an MSIX package that's currently running?","acceptedAnswer":{"@type":"Answer","text":"Use the -ForceTargetApplicationShutdown option with Add-AppxPackage, or set ForceTargetAppShutdown=true on AddPackageOptions when using the PackageManager API. This checks for processes using the target package and shuts them down, forcibly via TerminateProcess() if necessary, to unblock the deployment. Alternatively, defer the update instead of forcing shutdown if the app shouldn't be interrupted. daily.dev surfaces deployment API changes like this for developers automating MSIX update pipelines."}},{"@type":"Question","name":"How can I update an MSIX package without forcibly closing the running application?","acceptedAnswer":{"@type":"Answer","text":"Set uap17:UpdateWhileInUse to defer in AppxManifest.xml, which requires Windows 11 version 24H2 (build 26100) or later, or pass DeferRegistrationWhenPackagesAreInUse=true to AddPackageOptions for a single deployment request. Windows then delays the update until the package is no longer in use, and this manifest setting overrides force-shutdown options like ForceTargetAppShutdown entirely. Developers building update UX around active users can track these MSIX deferral options on daily.dev."}},{"@type":"Question","name":"How can I check if an MSIX package has a deferred update waiting to be applied?","acceptedAnswer":{"@type":"Answer","text":"Call PackageDeploymentManager.IsPackageRegistrationPending to check for the current user, or IsPackageRegistrationPendingForUser to check a specific user (requiring admin privilege if that user isn't the caller). Both return true if the package family has a previously deferred update still pending registration. daily.dev helps deployment engineers keep up with Windows App SDK APIs like these for MSIX updates."}}]}
```

