RemoveApp Command

Removes (deletes) from the BizTalk Management database a BizTalk application as well as all of the artifacts it contains. This does not uninstall the application. For instructions on doing this, see How to Uninstall a BizTalk Application.

The remove operation will fail in the following cases:

  • The application is not stopped. For instructions on stopping an application, see How to Start and Stop a BizTalk Application. The ApplicationManager SDK sample which is installed in the <Samples Path>\Admin\ExplorerOM\ directory illustrates how to programmatically start or stop a BizTalk Server application.

  • Other applications contain references to the application. If other applications contain references to the application you want to remove, you must first remove the references from the other applications. For instructions, see How to Remove a Reference to Another Application.

  • The application contains a send port group of which a send port in another application is a member. You must unenlist the member send port before you can delete the application. For instructions, see How to Unenlist a Send Port or Send Port Group.

  • The application contains a send port that is referenced by a party. You can delete the reference from the party or move the send port to a different application. For instructions on performing these tasks, see How to View or Edit a Party or How to Move an Artifact to a Different Application.

  • The application is the default application. If you want to delete it, you must first make another application the default. For instructions, see How to Change the Default Application.

  • An orchestration in the application is enlisted, started, or has a suspended instance. For more information about orchestrations, see Managing Orchestrations.


If the application contains a policy that is in a deployed state, the policy is not removed from the Rule Engine database and continues to display in the Policies folder under the <All Artifacts> application node of the BizTalk Administration console. If you add the policy to another application, the policy remains in a deployed state.


BTSTask RemoveApp /ApplicationName: value [/Server:value] [/Database:value]


Parameter Required Description
/ApplicationName (or /A, see Remarks) Yes Name of the BizTalk application to delete. If the name includes spaces, you must enclose it with double quotation marks (").
/Server (or /S, see Remarks) No Name of the SQL Server instance hosting the BizTalk Management database, in the form ServerName\InstanceName,Port.

Instance name is only required when the instance name is different than the server name. Port is only required when SQL Server uses a port number other than the default (1433).




If not provided, the name of the SQL Server instance running on the local computer is used.
/Database (or /D, see Remarks) No Name of the BizTalk Management database. If not specified, the BizTalk Management database running in the local instance of SQL Server is used.


BTSTask RemoveApp /ApplicationName:MyApplication


Parameters are not case-sensitive. You do not need to type the entire parameter name to specify it; you can type the first few letters of the parameter name that identify it unambiguously.

See Also

BTSTask Command-Line Reference
Undeploying BizTalk Applications