Removing OpenDJ Servers

This chapter includes the following procedures:

To Remove OpenDJ With the GUI Uninstaller
  1. Run the uninstall command, described in uninstall(1) in the Reference.

    (UNIX) Run /path/to/opendj/uninstall.

    (Windows) Double-click /path/to/opendj\uninstall.bat.

    (Mac OS X) Double-click /path/to/opendj/Uninstall.app.

    The Uninstall Options screen appears.

  2. Select the components to remove in the Uninstall Options screen, and then click Uninstall to proceed.

  3. To complete the process, manually remove any remaining components indicated in the Finished screen.

To Uninstall OpenDJ From the Command-Line
  1. Login as the user who installed and runs the server.

  2. Run the /path/to/opendj/uninstall --cli command.

    This command starts the removal program in interactive mode on the command-line, prompting you for each option. Alternatively, use additional uninstall options to specify choices for the options. See uninstall --help for more information:

    $ /path/to/opendj/uninstall --cli
    Do you want to remove all components of the server or select the components to
    remove?
    
        1)  Remove all components
        2)  Select the components to be removed
    
        q)  quit
    
    Enter choice [1]:
    
    The server is currently running and must be stopped before uninstallation can
    continue.
    Stop the Server and permanently delete the files? (yes / no) [yes]:
    
    Stopping Directory Server ..... Done.
    Deleting Files under the Installation Path ..... Done.
    
    The Uninstall Completed Successfully.
    To complete the uninstallation, you must delete manually the following files
    and directories:
    /path/to/opendj/lib
    See /var/....log for a detailed log of this operation.
  3. If the command output tells you to delete files manually, then remove those remaining files to complete the process:

    $ rm -rf /path/to/opendj
To Uninstall the Debian Package

When you uninstall the Debian package from the command-line, OpenDJ directory server is stopped if it is running:

  • Remove the package from your system:

    $ sudo dpkg -r opendj
    (Reading database ... 185725 files and directories currently installed.)
    Removing opendj ...
    *Stopping OpenDJ server...
    Stopping Server...
    [03/Jun/2013:10:00:49 +0200] category=BACKEND severity=NOTICE
     msgID=9896306 msg=The backend userRoot is now taken offline
    [03/Jun/2013:10:00:49 +0200] category=CORE severity=NOTICE
     msgID=458955 msg=The Directory Server is now stopped
    
    $

    Removing the package stops the server but does not remove your data or configuration, nor the dedicated opendj system user it created. Remove /opt/opendj manually to delete all files, and remove the opendj user if you no longer need it.

To Uninstall the RPM Package

When you uninstall the RPM package from the command-line, OpenDJ directory server is stopped if it is running.

  • Remove the package from your system:

    # rpm -e opendj
    Pre Uninstall - uninstall
    Stopping Server...
    [03/Jun/2013:10:42:46 +0200] category=BACKEND severity=NOTICE
     msgID=9896306 msg=The backend userRoot is now taken offline
    [03/Jun/2013:10:42:46 +0200] category=CORE severity=NOTICE
     msgID=458955 msg=The Directory Server is now stopped
    Post Uninstall - uninstall
    OpenDJ package removed. Server data (config, db, changelogDb, logs)
    and the opendj system account are kept; remove them manually if they
    are no longer needed.
    #

    Removing the package stops the server but does not remove your data or configuration, nor the dedicated opendj system user it created. Remove /opt/opendj manually to delete all files, and remove the opendj user if you no longer need it.

To Uninstall the Windows MSI Package

Remove OpenDJ directory server installed from the .msi package like any other Windows program.

  1. If OpenDJ is registered as a Windows service, remove the service first — the package does not manage it and leaves the registration behind, pointing at files that are about to be deleted:

    C:\path\to\opendj\bat> windows-service.bat --disableService
  2. Uninstall the package, either through Settings > Apps (or Control Panel > Programs and Features) by selecting OpenDJ and choosing Uninstall, or from the command-line:

    C:\> msiexec /x opendj-5.1.2.msi /quiet

    Uninstalling removes the files installed by the package. Your configured instance data under the installation directory (for example config, db, and logs) is not removed; delete the installation directory manually, or run uninstall.bat before removing the package, to remove all files. Running uninstall.bat also disables the Windows service if one is registered, which covers the first step above.

To Remove a Docker Container

A container started from the Docker image with a volume mounted at /opt/opendj/data, as in "To Run OpenDJ in Docker" in the Installation Guide, keeps its instance on that volume, which outlives the container. A container started without one keeps its instance in the container itself, and removing the container deletes it.

  1. If the server replicates, stop replication on the server with dsreplication disable first, unless the containers of the topology run with OPENDJ_REPLICATION_TYPE=simple and REPLICATION_PEERS, and the server is registered in the topology by its name rather than by an address, as described in "To Stop Replication Permanently For a Replica" in the Administration Guide.

  2. Stop and remove the container. This stops the server, but keeps its volume, if it has one:

    $ docker stop -t 60 opendj
    $ docker rm opendj
  3. If the containers of the topology run with OPENDJ_REPLICATION_TYPE=simple and REPLICATION_PEERS, replace each remaining container with one started over the same volume with the same options, but with the removed server left out of REPLICATION_PEERS. The environment of a container cannot be changed, so restarting the container is not enough. On its start, each new container removes from the topology the servers registered by name that are not listed, and drops them from its own replication server lists, which are configuration of that server alone: replace every remaining container, or the ones you leave keep trying to reach the removed server. See the Replication section of the README of the image.

  4. To delete the data and the configuration of the server, remove its volume as well:

    $ docker volume rm opendj-data