Linux系统中如何完全卸载按官方步骤安装的Confluent?
How to Fully Uninstall Confluent Platform
Hey there! I’ve helped many users work through full Confluent uninstalls, so let’s break this down step by step based on the most common 3-step installation methods from Confluent’s docs:
1. If you installed via package manager (APT/YUM/DNF)
This is the most common "3-step" setup for Debian/Ubuntu or RHEL/CentOS systems.
- First, stop and disable all Confluent services:
sudo systemctl stop confluent* sudo systemctl disable confluent* - Uninstall all Confluent packages completely:
- For Debian/Ubuntu:
sudo apt purge confluent-* sudo apt autoremove --purge - For RHEL/CentOS/Fedora:
sudo dnf remove confluent-* # Or sudo yum remove confluent-* for older versions sudo dnf autoremove
- For Debian/Ubuntu:
- Delete leftover config, data, and log directories:
sudo rm -rf /etc/confluent sudo rm -rf /var/lib/confluent sudo rm -rf /var/log/confluent
2. If you installed via tar.gz archive
If you downloaded and extracted the compressed package manually:
- Stop any running Confluent processes:
- If using the local development mode:
confluent local stop - Or find and kill processes directly:
ps aux | grep confluent | grep -v grep | awk '{print $2}' | xargs sudo kill -9
- If using the local development mode:
- Delete the main installation directory (replace
/opt/confluentwith your actual install path):sudo rm -rf /opt/confluent - Remove any custom config/data/log directories you might have created, plus user-specific configs:
rm -rf ~/.confluent # Add other paths if you used non-default locations - Clean up your shell’s environment variables:
Open your~/.bashrcor~/.zshrcfile, remove any lines that added Confluent to yourPATH, then run:source ~/.bashrc # Or source ~/.zshrc
3. If you installed via Confluent CLI (local mode)
If you used the CLI to set up a local development cluster:
- Stop and destroy the local cluster:
confluent local stop confluent local destroy - Delete the entire Confluent CLI installation directory:
rm -rf ~/.confluent - Remove the CLI from your
PATHby editing~/.bashrc/~/.zshrcand deleting the line that added~/.confluent/binto your path, then reload your shell config as above.
Quick Check
If you’re unsure which method you used:
- Look for
/etc/confluent→ package manager install - Look for
/opt/confluent→ tar.gz archive - Look for
~/.confluent→ Confluent CLI install
Double-check for any leftover Kafka/ZooKeeper processes with ps aux | grep kafka or ps aux | grep zookeeper and kill them if needed.
内容的提问来源于stack exchange,提问作者el323
相关产品推荐
相关产品推荐

