You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

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
      
  • 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
      
  • Delete the main installation directory (replace /opt/confluent with 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 ~/.bashrc or ~/.zshrc file, remove any lines that added Confluent to your PATH, 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 PATH by editing ~/.bashrc/~/.zshrc and deleting the line that added ~/.confluent/bin to 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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 08:52:27