=====================================
Uninstalling Package Security Manager
=====================================

#. Stop your docker containers by running the following command:

    .. code-block:: none

        docker compose stop

.. warning::

    :doc:`Back up the logs <restore>`, artifacts database, and Postgres database before uninstalling.

#. Open a terminal. 
#. Log in to your Package Security Manager instance.
#. Navigate to your Anaconda installer directory (``ate-installer-*``) by running the following command:

    .. code-block:: none

        # Replace <INSTALLER_DIR> with your installer directory
        cd <INSTALLER_DIR>

    .. tip:: 

        Start typing ``ate-installer-`` in your terminal, then press Tab to autocomplete the directory name.

#. Remove Package Security Manager's package data by running the following command: 

    .. code-block:: none

        rm -rf /opt/anaconda/repo

3. Uninstall Package Security Manager and its configurations by running the following command:

    .. code-block:: none

        # Replace <INSTALLER_DIR> with your installer directory
        rm -rf ~/<INSTALLER_DIR>
