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.
If the platform was managed by systemd, stop the individual units instead:
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.
On RPM-based systems, first list the installed packages, then erase them.
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/.
Then refresh package metadata:
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.
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.
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.
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 -rfon 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.

