Uninstalling logging

Red Hat OpenShift Logging 6.4

Uninstalling Loki Operator, Red Hat OpenShift Logging Operator and UIPlugin

Red Hat OpenShift Documentation Team

Abstract

This document provides information about uninstalling OpenShift Logging.

Chapter 1. Uninstalling logging

1.1. Uninstalling the Red Hat OpenShift Logging Operator

You can uninstall Red Hat OpenShift Logging Operator by using either the OpenShift CLI (oc) or the Red Hat OpenShift Logging web console.

1.1.1. Deleting the Red Hat OpenShift Logging Operator by using the CLI

Delete the Red Hat OpenShift Logging Operator by using the OpenShift CLI (oc).

Prerequisites

  • You have administrator permissions.
  • You installed the OpenShift CLI (oc).

Procedure

  1. Delete the ClusterLogForwarder custom resource (CR) by running the following command:

    $ oc delete ClusterLogForwarder instance -n openshift-logging

    Change instance to the name of your ClusterLogForwarder CR if you have used a different name.

  2. Delete the service account by running the following commands:

    $ oc adm policy remove-cluster-role-from-user lokistack-tenant-logs -z logging-collector -n openshift-logging
    $ oc adm policy remove-cluster-role-from-user collect-application-logs -z logging-collector -n openshift-logging
    $ oc adm policy remove-cluster-role-from-user collect-infrastructure-logs -z logging-collector -n openshift-logging
    $ oc adm policy remove-cluster-role-from-user collect-audit-logs -z logging-collector -n openshift-logging
    $ oc adm policy remove-cluster-role-from-user logging-collector-logs-writer -z logging-collector -n openshift-logging
    $ oc delete serviceaccount logging-collector -n openshift-logging
  3. Delete the LogFileMetricExporter resource if you have deployed it by running the following command:

    $  oc -n openshift-logging delete LogFileMetricExporter --all
  4. Check the current version of the subscribed Red Hat OpenShift Logging Operator in the currentCSV field by running the following command:

    $ oc get csv -n openshift-logging | grep cluster-logging

    Example output

    cluster-logging.v6.2.4    Red Hat OpenShift Logging   6.2.4     cluster-logging.v6.2.3    Succeeded

    Note the first field in the output, it indicates the currentCSV value.

  5. Delete the subscription associated with the Red Hat OpenShift Logging Operator by running the following command:

    $ oc delete subscriptions.operators.coreos.com cluster-logging -n openshift-logging
  6. Delete the CSV object for Red Hat OpenShift Logging Operator in the target namespace using the currentCSV value obtained from the earlier step:

    $ oc delete csv cluster-logging.v6.2.4 -n openshift-logging
  7. Uninstall the Red Hat OpenShift Logging Operator by running the following command:

    $ oc delete OperatorGroup <name> -n openshift-logging

1.1.2. Deleting the Red Hat OpenShift Logging Operator by using the web console

Delete the Red Hat OpenShift Logging Operator by using the Red Hat OpenShift Logging web console.

Prerequisites

  • You have administrator permissions.
  • You have access to the Red Hat OpenShift Logging web console.

Procedure

  1. In the web console, go to OperatorsInstalled Operators.
  2. Find Red Hat OpenShift Logging Operator in the list and click kebab next to it, then click Uninstall Operator.
  3. In the pop-up select Delete all operand instances for this operator and click Uninstall.

1.2. Uninstalling the Loki Operator

You can uninstall Loki Operator by using either the OpenShift CLI (oc) or the Red Hat OpenShift Logging web console. After uninstalling Loki Operator, delete persistent volume claims (PVCs) if you do not want to reuse them in other installations of LokiStack.

1.2.1. Deleting the Loki Operator by using the CLI

Delete the Loki Operator by using the OpenShift CLI (oc).

Prerequisites

  • You have administrator permissions.
  • You installed the OpenShift CLI (oc).

Procedure

  1. Delete the LokiStack custom resource (CR) by running the following command:

    $ oc delete LokiStack logging-loki -n openshift-logging

    Substitute logging-loki with the name of your LokiStack CR if you have used a different name.

  2. Check the current version of the subscribed Loki Operator in the currentCSV field by running the following command:

    $ oc get csv -n openshift-operators-redhat | grep loki-operator

    Example output

    loki-operator.v6.2.4      Loki Operator               6.2.4     loki-operator.v6.2.3                    Succeeded

    Note the first field in the output, it indicates the currentCSV value.

  3. Delete the subscription associated with the Loki Operator by running the following command:

    $ oc delete subscriptions.operators.coreos.com loki-operator -n openshift-operators-redhat
  4. Delete the CSV object for Loki Operator in the target namespace using the currentCSV value obtained from the earlier step:

    $ oc delete csv loki-operator.v6.2.4 -n openshift-operators-redhat
  5. Uninstall the Loki Operator by running the following command:

    $ oc delete OperatorGroup <name> -n openshift-operators-redhat

1.2.2. Deleting the Loki Operator by using the web console

Delete the Loki Operator by using the Red Hat OpenShift Logging web console.

Prerequisites

  • You have administrator permissions.
  • You have access to the Red Hat OpenShift Logging web console.

Procedure

  1. In the web console, go to OperatorsInstalled Operators.
  2. Find Loki Operator in the list and click kebab next to it, then click Uninstall Operator.
  3. In the pop-up, select Delete all operand instances for this operator and click Uninstall.

1.2.3. Deleting logging PVCs by using the CLI

You can delete persistent volume claims (PVCs) if you do not want to reuse them in other installations of LokiStack by using the OpenShift CLI (oc).

Prerequisites

  • You have administrator permissions.
  • You installed the OpenShift CLI (oc).

Procedure

  • Delete logging PVCs by running the following command:

    $ oc -n openshift-logging delete pvc -l app.kubernetes.io/name=lokistack

1.2.4. Deleting logging PVCs by using the web console

You can delete persistent volume claims (PVCs) if you do not want to reuse them in other installations of LokiStack, by using the web console.

Prerequisites

  • You have administrator permissions.
  • You have access to the Red Hat OpenShift Logging web console.

Procedure

  1. In the web console, go to the StoragePersistent Volume Claims page.
  2. Click kebab next to each PVC, and select Delete Persistent Volume Claim.

1.3. Uninstalling the UIPlugin

You can uninstall UIPlugin by using either the OpenShift CLI (oc) or the Red Hat OpenShift Logging web console.

1.3.1. Deleting the UIPlugin by using the CLI

Delete the UIPlugin by using the OpenShift CLI (oc).

Prerequisites

  • You have administrator permissions.
  • You installed the OpenShift CLI (oc).

Procedure

  • Delete the UIPlugin by running the following command:

    $ oc delete uiplugin logging

1.3.2. Deleting the UIPlugin by using the web console

Delete the UIPlugin plugin by using the Red Hat OpenShift Logging web console.

Prerequisites

  • You have administrator permissions.
  • You have access to the Red Hat OpenShift Logging web console.

Procedure

  1. In the web console, go to OperatorsInstalled Operators.
  2. Click Cluster Observability Operator from the Installed Operators list and go to the UIPlugin tab.
  3. Click kebab for the UIPlugin logging entry and select Delete UIPlugin.

Legal Notice

Copyright © 2025 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at Content from creativecommons.org is not included.http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.