Skip navigation.
Downloads | Product Documentation | Support

WebLogic Server Command Reference

## DELETE

Deletes MBeans. If you delete an Administration MBean, WebLogic Server removes the corresponding entry from the domain's `config.xml` file.

If the command is successful, it returns `OK`.

Note: When you delete an Administration MBean, a WebLogic Server instance does not delete the corresponding Configuration MBean until you restart the server instance.

### Syntax

>     java [ SSL Arguments ] weblogic.Admin
>          [ {-url URL} |
>            {-adminurl[protocol://]Admin-Server-listen-address:listen-port}
>          ]
>          [ User Credentials Arguments ]
>        DELETE {-type mbeanType|-mbean objectName}

Arguments | Definition
--- | ---
{-url [`protocol``://`]`listen-address:listen-port``}` or `{-adminurl` [`protocol``://`]`Admin-Server-listen-address:listen-port``}` | To delete Administration MBeans, use `-url` to specify the Administration Server's listen address and listen port. To delete Runtime MBeans or Local Configuration MBeans, use one of the following: `-url` to specify the listen address and listen port of the server instance on which you want to delete MBeans. `-adminurl` to delete instances of a Runtime or Local Configuration MBean type from all server instances in the domain. For more information, refer to the -url and `-adminurl` entries in Table 1-3 on page 11 and Protocol Support.
`-type` `mbeanType` | Deletes all MBeans of the specified type. For more information, refer to Specifying MBean Types.
`-mbean` `objectName` | Fully qualified object name of an MBean in the `WebLogicObjectName` format. For example: `"``domain``:Type=``type``,Name=``name``"` For more information, refer to the Javadoc for `WebLogicObjectName`.

### Example

The following example deletes the `JDBCConnectionPool` Administration MBean named `myPool`:

>     java weblogic.Admin -url AdminHost:7001 -username weblogic
>      -password weblogic DELETE -mbean
>      MedRec:Name=myPool,Type=JDBCConnectionPool

For more information about the environment in which this example runs, refer to Example Environment.

If the command succeeds, it prints the following to standard out:

`Ok`

The following example deletes the `JDBCConnectionPool` Local Configuration MBean named `myPool` on a server instance named MedRecManagedServer:

>     java weblogic.Admin -url ManagedHost:8001 -username weblogic
>      -password weblogic DELETE -mbean
>       MedRec:Location=MedRecManagedServer,Name=myPool,
>      Type=JDBCConnectionPoolConfig

The following example deletes all `JDBCConnectionPool` Local Configuration MBeans for all server instances in the domain:

>     java weblogic.Admin -adminurl AdminHost:7001 -username weblogic
>        -password weblogic DELETE -type JDBCConnectionPoolConfig

The following example deletes all `JDBCConnectionPool` Local Configuration MBeans on a server instance named `MedRecManagedServer`:

>     java weblogic.Admin -url ManagedHost:8001 -username weblogic
>      -password weblogic DELETE -type JDBCConnectionPoolConfig