如何从我的电脑上移除XFCE?

我的电脑因为我安装了太多桌面环境而过热,例如:MATE、Cinnamon和XFCE。我已经卸载了它们,但是XFCE无法卸载。我收到了以下错误信息。
 sudo apt-get purge xfce4
    Reading package lists... Error!
    E: Problem syncing the file - sync (5: Input/output error)
    E: The package lists or status file could not be parsed or opened.

@AvinashRaj 你看到他的答案和我之前进行的解决这个问题的命令不一样 - Liso
可能是文件系统错误或损坏的文件/磁盘。尝试在根分区上运行fsck命令。 - mdalacu
不工作,每次执行sudo apt-get updatesudo apt-get install都会出现这个错误。我别无选择,只能通过删除并安装Ubuntu 14.04 LTS来解决问题。 - Liso
此问题已关闭。 - Liso
7个回答

试试这个

sudo apt-get purge xfconf xfce4-utils xfwm4 xfce4-session xfdesktop4 exo-utils xfce4-panel xfce4-terminal  thunar

跟随着
sudo apt autoremove

不工作,问题仍然存在。 - Liso
4这在Ubuntu Studio 14.04 LTS上完美运行。而被接受的答案中的sudo apt-get purge xfce4没有起作用。 - Mansueli
我在16.04 LTS上工作过(尽管我先运行了被接受的答案)。 - AwokeKnowing
它也适用于16.04 LTS(我也先运行了接受的答案)。 - Mahmudul Hasan Shohag
1还在Pop!_os 21.04上工作过。 - Cedric Simon

试试这些

sudo apt-get -f install
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get update

现在
sudo apt-get purge xfce4

FirstStrike@ubuntu13.04-desktop:~$ sudo apt-get -f install [sudo] password for FirstStrike: 读取软件包列表... 出错! E: 无法解析软件包文件 /var/lib/apt/lists/id.archive.ubuntu.com_ubuntu_dists_raring_main_binary-i386_Packages (1) E: 无法解析或打开软件包列表或状态文件。没成功。 - Liso
我正在尝试在Debian上移除xfce4,我执行了上述命令和sudo apt-get autoremove,但是xfce4仍然出现在显示管理器中,我仍然可以进入xfce4桌面环境。如何解决这个问题? - AGT

在我的情况下(使用了Cinnamon和XFCE的Mint),我做了以下操作:
sudo apt-get -f install
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get update

然后:

sudo apt-get purge xfce4  # failed

然后:

sudo apt-get purge xfconf
sudo apt-get autoremove
sudo apt-get -f install
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get update

试试这个:

sudo apt purge ^xfce4*

然后:

sudo apt autoremove

注意:您可能需要将模式放在引号中,以避免shell对其进行扩展。 - cocomac

此链接开始

您可以运行以下命令完全从计算机中删除xfce

dpkg -l | grep .xfce. | xargs sudo apt-get purge --auto-remove --yes


首先,检查将要被移除的内容。
sudo dpkg -l | grep .xfce.

如果你没问题的话,运行这个命令。
sudo apt autoremove --purge xfce*

命令解释

# dpkg -l       lists all installed packages
# grep .xfce.   filters, so that only packages with keyword xfce within their names, listed
# purge         removes mentioned package
# autoremove    tries to remove dependency packages

尝试一下:sudo apt-get remove xfce4-* 这样可以删除所有相关的软件包,在你执行了sudo apt-get purge xfce4之后,当然。

在引用文件时,你需要将 * 加上引号,以防有类似的包含文件。 - Volker Siegel
6永远不要使用*在包名后面来删除软件包。这样会导致其他软件包的依赖关系被移除。 - αғsнιη
2正如KasiyA所说,将*\*放在赋予给apt-命令的名称的末尾并不是尝试将其作为shell样式模式进行匹配,而是作为正则表达式。xfce4-将匹配所有包含xfce4(不仅仅是以xfce4-开头的,而是任何包含xfce4的)的软件包名称中的 任何位置。(详情请参见Andrea CorbelliniRadu Rădeanu为什么apt会在添加*后缀时移除不需要的软件包?这个问题上的回答)sudo apt-get remove ^xfce4-将执行这个答案可能意图的操作。 - Eliah Kagan