Files
karuo-ai/01_卡资(金)/金仓_存储备份/脚本/doubao_uninstall_ime.sh
2026-07-19 00:21:46 +08:00

32 lines
1.1 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
# 卸载豆包输入法DoubaoIme保留豆包 App五笔等系统输入法不受影响
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
KARUO_SUDO="${SCRIPT_DIR}/karuo_sudo.sh"
killall DoubaoIme 2>/dev/null || true
killall DoubaoImeSettings 2>/dev/null || true
killall DoubaoImeInstaller 2>/dev/null || true
if [[ -d "/Library/Input Methods/DoubaoIme.app" ]]; then
if [[ -x "$KARUO_SUDO" ]]; then
"$KARUO_SUDO" /bin/rm -rf "/Library/Input Methods/DoubaoIme.app"
else
echo "需要管理员权限删除 /Library/Input Methods/DoubaoIme.app" >&2
exit 1
fi
fi
rm -rf "$HOME/Library/Application Support/DoubaoIme"
rm -f "$HOME/Library/Preferences/com.bytedance.inputmethod.doubaoime.plist"
rm -rf "$HOME/Library/HTTPStorages/com.bytedance.inputmethod.doubaoime"*
tccutil reset Accessibility com.bytedance.inputmethod.doubaoime 2>/dev/null || true
if [[ -d "/Library/Input Methods/DoubaoIme.app" ]]; then
echo "❌ DoubaoIme.app 仍在,请检查 sudo" >&2
exit 1
fi
echo "✅ 豆包输入法已卸载DoubaoIme.app 与用户数据已清理)"