Sun Java System Communications Services 6 2005Q4 Delegated Administrator Guide

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 grace period.

You can perform a purge at any time by invoking the command manually.

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.

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.

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.

Note –

The commadmin domain purge command must be run by the Top-level administrator.


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]


The following options are mandatory:



-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:



-g grace

Grace period in days before the domain is purged. Domains marked for deletion for less than grace days will not be 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 purgecommand.

-h, -?

Prints command usage syntax. 

-i inputfile

Reads the command information from a file instead of 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 and cal. These values are case-insensitive.


Use SSL (Secure Socket Layer) to connect to the Access Manager. 


Enable debugging output. 


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.


In the following example, the domain is purged and all entries within the domain are also removed:

commadmin domain purge -D chris -d -n -w bolton