如何彻底卸载Wine并确认残留文件夹是否可安全删除?
Hey there! I totally get the annoyance of leftover files after trying to uninstall a program—let's get this Wine issue sorted for you properly, since you're using an apt-based system (like Ubuntu or Debian):
第一步:彻底清理Wine的系统级组件
The regular sudo apt remove wine only deletes the base package but leaves behind config files and unused dependencies. Instead, run these commands one by one:
- Purge all Wine-related packages along with their configuration files:
Thesudo apt purge wine**wildcard makes sure we catch every Wine variant (like wine-stable, wine-devel, etc.) that might be installed. - Remove any leftover dependencies that were installed just to support Wine:
Thesudo apt autoremove --purge--purgeflag ensures we don't leave behind any stray configs from those dependencies either.
第二步:清理用户专属的Wine配置文件
Wine stores personal settings and app data in your home directory too—delete these with:
rm -rf ~/.wine rm -rf ~/.local/share/wine rm -rf ~/.config/wine
关于/usr/lib/wine文件夹的安全性
That leftover wine folder in /usr/lib/ is just a remnant of the original Wine installation, and it's completely safe to delete manually if the above commands didn't take care of it. The /usr/lib/x86_64-linux-gnu directory (you mentioned "x86 64 linux gnu") is where 64-bit system libraries live, but the wine subfolder only contains Wine-specific files—removing it won't harm your system at all.
To delete it, run:
sudo rm -rf /usr/lib/wine
确认是否完全卸载
You can double-check if any Wine packages are still lingering with this command:
dpkg --list | grep wine
If no results show up, you've successfully removed Wine entirely!
备注:内容来源于stack exchange,提问作者TheArchCoder




