Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> Linux 教學

Debian/Ubuntu 徹底移除 Wine 完整指令指南

編輯:Linux 教學

為什麼需要「徹底」移除?

Wine 在模擬 Windows 環境時會在家目錄建立大量配置檔、虛擬 C 槽、選單捷徑等。單純 apt remove wine 只會刪除套件本體,殘留資料可能佔用空間、污染選單、甚至影響後續重裝相容性。

五步驟徹底清除

  1. 移除套件本體
    sudo apt-get remove --purge wine*   # 通配符一次清理所有 wine 相關套件
  2. 刪除用戶層虛擬環境
    rm -rf ~/.wine
  3. 清理不再需要的依賴套件
    sudo apt-get autoremove --purge
  4. 清理桌面整合捷徑
    rm -rf ~/.local/share/applications/wine*
  5. 清理選單合併配置
    rm -rf ~/.config/menus/applications-merged/wine*

⚠️ 關鍵提醒

上述指令使用 rm -rf 搭配 root 或家目錄絕對路徑,**請三確認路徑無誤再執行**,誤刪系統關鍵目錄將導致災難性後果。建議先用 ls 確認目標存在再下刪除指令。

驗證清除結果

dpkg -l | grep -i wine   # 應無輸出
ls -la ~/.wine           # 應提示 No such file or directory
Copyright © Windows教程網 All Rights Reserved