Confluent Uninstallation
Linux Guide
System Administration
Server Management
Open-Source Tools

Completely uninstall confluent on linux

Master System Design with Codemia

Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.

Introduction

Completely removing Confluent Platform from a Linux machine means more than uninstalling one package. You also need to stop running services, remove package repository entries if they were added, and clean up data, logs, and configuration files that package removal usually leaves behind.

The exact commands depend on how Confluent was installed. The safest process is to identify the installation method first, then remove software and state separately.

Step 1: Stop All Running Confluent Services

Before uninstalling anything, stop the processes cleanly. That prevents corrupted local state and avoids deleting files that are still in use.

bash
confluent local services stop
ps aux | grep -E 'kafka|zookeeper|schema-registry|connect|ksql' | grep -v grep

If the platform was managed by systemd, stop the individual units instead:

bash
1sudo systemctl stop confluent-server
2sudo systemctl stop confluent-schema-registry
3sudo systemctl stop confluent-kafka-connect
4sudo systemctl stop confluent-ksqldb

Use only the services that actually exist on the machine.

Step 2: Remove Installed Packages

If Confluent was installed through apt, purge the relevant packages and then remove unused dependencies.

bash
dpkg -l | grep confluent
sudo apt purge 'confluent*'
sudo apt autoremove --purge

On RPM-based systems, first list the installed packages, then erase them.

bash
rpm -qa | grep confluent
sudo rpm -e confluent-server confluent-platform

Package names vary by version and which components were installed, so listing first is important. Do not guess package names on a shared system.

Step 3: Remove the Package Repository Configuration

If you added the Confluent repository to the machine, remove that entry too. Otherwise future package refreshes still reference it.

On Debian and Ubuntu systems, check files under /etc/apt/sources.list.d/. On RHEL-like systems, look in /etc/yum.repos.d/.

bash
sudo rm -f /etc/apt/sources.list.d/confluent.list
sudo rm -f /etc/yum.repos.d/confluent.repo

Then refresh package metadata:

bash
sudo apt update
# or
sudo yum makecache

Step 4: Remove Data, Logs, and Configuration

Package removal usually does not erase Kafka data directories, connector state, log segments, or service configuration. That cleanup is what makes the uninstall complete.

bash
1sudo rm -rf /etc/kafka
2sudo rm -rf /etc/schema-registry
3sudo rm -rf /etc/ksqldb
4sudo rm -rf /var/lib/kafka
5sudo rm -rf /var/lib/zookeeper
6sudo rm -rf /var/log/kafka
7sudo rm -rf /var/log/confluent

Only remove these paths if you are sure the machine no longer needs the cluster metadata or local topic data. On a production broker, deleting data directories is irreversible.

Step 5: Remove Tarball or Manual Installations

If Confluent was installed from a downloaded archive instead of packages, package manager commands will not help. In that case, delete the extracted installation directory and undo any shell profile changes.

bash
sudo rm -rf /opt/confluent
sed -n '1,200p' ~/.bashrc | grep CONFLUENT

If you added PATH or CONFLUENT_HOME entries in shell startup files, remove those lines manually.

Step 6: Verify That Nothing Is Left Running

A complete uninstall ends with verification. Check for residual processes, service definitions, and ports.

bash
ps aux | grep -E 'kafka|zookeeper|schema-registry|connect|ksql' | grep -v grep
sudo systemctl list-unit-files | grep confluent
sudo ss -ltnp | grep -E '9092|2181|8081|8083|8088'

If these commands show nothing relevant, the machine is probably clean.

Common Pitfalls

  • Removing packages but leaving Kafka data directories behind, which makes a later reinstall pick up stale state.
  • Running rm -rf on broker data without confirming that the node is truly disposable.
  • Forgetting the repository file, so the system still references Confluent in package refreshes.
  • Assuming one metapackage name covers every installed component. Many installations include separate service packages.
  • Mixing tarball and package-manager instructions without first checking how the machine was actually set up.

Summary

  • Stop Confluent services before uninstalling anything.
  • Remove packages with the correct package manager and list installed components first.
  • Delete repository definitions if they were added during installation.
  • Clean up data, logs, and configuration only after confirming they are no longer needed.
  • Verify the uninstall by checking processes, services, and listening ports.

Course illustration
Course illustration

All Rights Reserved.