h1. {anchor:ACFEX} commadmin domain purge
The {{commadmin domain purge}} command permanently removes all entries or service of entries that have been marked for removal. This can include domains, users, groups, and resources.
As part of periodic maintenance operations, use the {{commadmin domain purge}} command to remove all entries that have been deleted for a time period that is longer than the specified delay period (grace period).
You can perform a purge at any time by invoking the command in commadmin. There is no equivalent in Delegated Administrator Console.
If the {{-d*}} option is specified, all domains are searched for users and domains that are marked as deleted. Users that are marked as deleted will be purged from their domain, but the domain will not be purged unless it is also marked as deleted. If a domain is marked as deleted, it will be purged along with all users within that domain.
When you invoke the command, the directory is searched and a list of domains is created whose entries include domains that have been marked for deletion longer than the specified grace period. The default value for the grace period is set to 5 days.
After a service has been marked as deleted, a utility that removes resources such as mailboxes or calendars must be run before the service can be purged from the directory:.
* For mail services, the program is called {{msuserpurge}}. Refer to the _Sun Java System Messaging Server Administration Reference_ for information about the {{msuserpurge}} utility.
* For calendar services, the program is {{csclean}}. Refer to the _Sun Java System Calendar Server Administration Guide_ for information about the {{csclean}} utility.
* If instant messaging (IM) service has been marked as deleted, the {{commadmin domain purge}} command purges IM service from the directory. You do not have to run an IM-specific utility to remove IM resources, as you do for mail or calendar service.
{info:title=Note}
The {{commadmin domain purge}} command must be run by the Top-Level Administrator.
{info}
For more information about how to remove users and services from a domain, see [Removing Users, Groups, and Services from a Domain].
h2. {anchor:ACFEY} Syntax
{panel}
{{commadmin domain purge –D _login_ –n _domain_ –w _password_ –d _domain_ [–g _grace_]}}
{{[–h] [–?] [–i _inputfile_] [–p _AM port_] [–s] [–S _service_] [–v] [–V] [–X _AM host_]}}
{panel}
h2. {anchor:ACFEZ} Options
The following options are mandatory:
||Option ||Description ||
|{{-D}} _login_|The user ID of the Top-Level Administrator.|
|{{-n}} _domain_|Domain of the Top-Level Administrator.|
|{{-w}} _password_|Password of the Top-Level Administrator.|
|{{-d}} _domain_|Purge specified domain. The * operator ({{-d*}}) may be used to search for a pattern.|
The following options are non-mandatory:
||Option ||Description ||
|{{-g}} _grace_|Delay period (grace period) in days before the domain is purged. Domains marked for deletion for fewer than _grace_ days will not be purged. \\
\\For example, if you use {{-g 7}}, all entries that have been marked for deletion for 7 days and more are purged, but entries marked for deletion for 6 days and fewer are not purged.\\
\\A 0 indicates purge immediately. \\
\\The default value is 5 days. The default value cannot be changed permanently. You can change the grace period only by using the {{-g}} _grace_ option in the {{commadmin domain purge}} command. |
|{{-h}}, {{–?}}|Prints command usage syntax.|
|{{-i}} _inputfile_|Reads the command information from a file instead of the command line.\\
\\An option value specified in the input file overrides any value for the same option set in the command line.|
|{{-p}} _AM port_|Specifies an alternate TCP port where the Access Manager is listening. If not specified, the default _AM port_ is used, or Port 80 is used if no default was configured at install time.|
|{{-S}} _service_|Removes service related object classes and attributes from the domain. If the domain contains users and resources it removes the service specific data from the directory for these users and resources.\\
\\The list of services is separated by the comma (,) delimiter.\\
\\The valid _service_ values are {{mail}}, {{cal}}, and {{im}}. These values are case-insensitive.|
|{{-s}}|Use SSL (Secure Socket Layer) to connect to the Access Manager.|
|{{-v}}|Enable debugging output.|
|{{-V}}|Prints information about the utility and its version.|
|{{-X}} _AM host_|Specifies the host on which the Access Manager is running. If not specified, the default _AM host_ is used, or the localhost if no default was configured at install time.|
h2. {anchor:ACFFA} Example
In the following example, the {{siroe.com}} domain is purged and all entries within the domain are also removed:
{panel}
{{commadmin domain purge –D chris –d siroe.com –n sesta.com –w bolton}}
{panel}
The {{commadmin domain purge}} command permanently removes all entries or service of entries that have been marked for removal. This can include domains, users, groups, and resources.
As part of periodic maintenance operations, use the {{commadmin domain purge}} command to remove all entries that have been deleted for a time period that is longer than the specified delay period (grace period).
You can perform a purge at any time by invoking the command in commadmin. There is no equivalent in Delegated Administrator Console.
If the {{-d*}} option is specified, all domains are searched for users and domains that are marked as deleted. Users that are marked as deleted will be purged from their domain, but the domain will not be purged unless it is also marked as deleted. If a domain is marked as deleted, it will be purged along with all users within that domain.
When you invoke the command, the directory is searched and a list of domains is created whose entries include domains that have been marked for deletion longer than the specified grace period. The default value for the grace period is set to 5 days.
After a service has been marked as deleted, a utility that removes resources such as mailboxes or calendars must be run before the service can be purged from the directory:.
* For mail services, the program is called {{msuserpurge}}. Refer to the _Sun Java System Messaging Server Administration Reference_ for information about the {{msuserpurge}} utility.
* For calendar services, the program is {{csclean}}. Refer to the _Sun Java System Calendar Server Administration Guide_ for information about the {{csclean}} utility.
* If instant messaging (IM) service has been marked as deleted, the {{commadmin domain purge}} command purges IM service from the directory. You do not have to run an IM-specific utility to remove IM resources, as you do for mail or calendar service.
{info:title=Note}
The {{commadmin domain purge}} command must be run by the Top-Level Administrator.
{info}
For more information about how to remove users and services from a domain, see [Removing Users, Groups, and Services from a Domain].
h2. {anchor:ACFEY} Syntax
{panel}
{{commadmin domain purge –D _login_ –n _domain_ –w _password_ –d _domain_ [–g _grace_]}}
{{[–h] [–?] [–i _inputfile_] [–p _AM port_] [–s] [–S _service_] [–v] [–V] [–X _AM host_]}}
{panel}
h2. {anchor:ACFEZ} Options
The following options are mandatory:
||Option ||Description ||
|{{-D}} _login_|The user ID of the Top-Level Administrator.|
|{{-n}} _domain_|Domain of the Top-Level Administrator.|
|{{-w}} _password_|Password of the Top-Level Administrator.|
|{{-d}} _domain_|Purge specified domain. The * operator ({{-d*}}) may be used to search for a pattern.|
The following options are non-mandatory:
||Option ||Description ||
|{{-g}} _grace_|Delay period (grace period) in days before the domain is purged. Domains marked for deletion for fewer than _grace_ days will not be purged. \\
\\For example, if you use {{-g 7}}, all entries that have been marked for deletion for 7 days and more are purged, but entries marked for deletion for 6 days and fewer are not purged.\\
\\A 0 indicates purge immediately. \\
\\The default value is 5 days. The default value cannot be changed permanently. You can change the grace period only by using the {{-g}} _grace_ option in the {{commadmin domain purge}} command. |
|{{-h}}, {{–?}}|Prints command usage syntax.|
|{{-i}} _inputfile_|Reads the command information from a file instead of the command line.\\
\\An option value specified in the input file overrides any value for the same option set in the command line.|
|{{-p}} _AM port_|Specifies an alternate TCP port where the Access Manager is listening. If not specified, the default _AM port_ is used, or Port 80 is used if no default was configured at install time.|
|{{-S}} _service_|Removes service related object classes and attributes from the domain. If the domain contains users and resources it removes the service specific data from the directory for these users and resources.\\
\\The list of services is separated by the comma (,) delimiter.\\
\\The valid _service_ values are {{mail}}, {{cal}}, and {{im}}. These values are case-insensitive.|
|{{-s}}|Use SSL (Secure Socket Layer) to connect to the Access Manager.|
|{{-v}}|Enable debugging output.|
|{{-V}}|Prints information about the utility and its version.|
|{{-X}} _AM host_|Specifies the host on which the Access Manager is running. If not specified, the default _AM host_ is used, or the localhost if no default was configured at install time.|
h2. {anchor:ACFFA} Example
In the following example, the {{siroe.com}} domain is purged and all entries within the domain are also removed:
{panel}
{{commadmin domain purge –D chris –d siroe.com –n sesta.com –w bolton}}
{panel}