blob: fc816a6e8f356313127d7c694e8f25ed90351497 [file] [log] [blame]
type=page
status=published
title=delete-domain
next=delete-file-user.html
prev=delete-custom-resource.html
~~~~~~
= delete-domain
[[delete-domain-1]][[GSRFM00075]][[delete-domain]]
== delete-domain
Deletes a domain
[[sthref674]]
=== Synopsis
[source]
----
asadmin [asadmin-options] delete-domain [--help]
[--domaindir domaindir] domain-name
----
[[sthref675]]
=== Description
The `delete-domain` subcommand deletes the specified domain. The domain
must already exist and must be stopped.
This subcommand is supported in local mode only.
[[sthref676]]
=== Options
asadmin-options::
Options for the `asadmin` utility. For information about these
options, see the link:asadmin.html#asadmin-1m[`asadmin`(1M)] help page.
`--help`::
`-?`::
Displays the help text for the subcommand.
`--domaindir`::
The directory where the domain to be deleted is located. If specified,
the path must be accessible in the file system. If not specified, the
domain under the domain root directory, which defaults to
as-install``/domains``, is deleted.
[[sthref677]]
=== Operands
domain-name::
The unique name of the domain you want to delete.
[[sthref678]]
=== Examples
[[GSRFM543]][[sthref679]]
==== Example 1   Deleting a Domain
This example deletes a domain named `mydomain4` from the default domains
directory.
[source]
----
asadmin> delete-domain mydomain4
Domain mydomain4 deleted.
Command delete-domain executed successfully.
----
[[GSRFM544]][[sthref680]]
==== Example 2   deleting a Domain From an Alternate Location
This example deletes a domain named `sampleDomain` from the
`/home/someuser/domains` directory.
[source]
----
asadmin> delete-domain --domaindir /home/someuser/domains sampleDomain
Domain sampleDomain deleted
Command delete-domain executed successfully.
----
[[sthref681]]
=== Exit Status
0::
subcommand executed successfully
1::
error in executing the subcommand
[[sthref682]]
=== See Also
link:asadmin.html#asadmin-1m[`asadmin`(1M)]
link:create-domain.html#create-domain-1[`create-domain`(1)],
link:list-domains.html#list-domains-1[`list-domains`(1)],
link:start-domain.html#start-domain-1[`start-domain`(1)],
link:stop-domain.html#stop-domain-1[`stop-domain`(1)]