1.停止ClickHouse服务
sudo service clickhouse-server stop
2.删除所有的数据和日志文件
sudo rm -rf /var/lib/clickhouse/
sudo rm -rf /var/log/clickhouse-server/
3.如果你使用的是systemd来管理服务,你可以通过以下命令来停止并删除服务
sudo systemctl stop clickhouse-server
sudo systemctl disable clickhouse-server
sudo systemctl daemon-reload
4.删除所有的配置文件
sudo rm -rf /etc/clickhouse-server/
sudo rm -rf /etc/clickhouse-client/
sudo rm -rf /etc/systemd/system/clickhouse-server.service
5.删除所有的启动文件
sudo rm -rf /usr/bin/clickhouse*
sudo rm -rf /usr/share/bash-completion/completions/clickhouse*
sudo rm -rf /usr/share/doc/clickhouse*
6.清理残留的用户和用户组
sudo userdel -r clickhouse
sudo groupdel clickhouse
7.查找是否卸载干净(这一步很关键,否则重装可能无法启动)
sudo find / -name clickhouse*
如果还有包含clickhouse关键字的/usr/、/etc/相关目录或者文件,请继续删除。
标签:TGZ,sudo,server,etc,rf,Clickhouse,卸载,rm,clickhouse From: https://www.cnblogs.com/yeyuzhuanjia/p/18082169