无法彻底清除 emacs - 出现 emacs-gtk 错误

无法彻底清除 emacs - 出现 emacs-gtk 错误

正如标题所述。我的 emacs 安装已损坏,因此我尝试在重新安装之前清除所有内容。

不幸的是,每当我跑步时:

sudo apt-get remove emacs-bin-common emacs-common emacs-el emacs-gtk

我得到以下输出。

Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  emacs-bin-common emacs-common emacs-el emacs-gtk
0 upgraded, 0 newly installed, 4 to remove and 2 not upgraded.
1 not fully installed or removed.
After this operation, 108 MB disk space will be freed.
Do you want to continue? [Y/n] y
dpkg: warning: files list file for package 'emacsen-common' missing; assuming package has no files currently installed
(Reading database ... 321973 files and directories currently installed.)
Removing emacs-gtk (1:27.1+1-3ubuntu3) ...
chdir /var/lib/emacsen-common/state/flavor/installed: No such file or directory at /usr/lib/emacsen-common/lib.pl line 27.
dpkg: error processing package emacs-gtk (--remove):
 installed emacs-gtk package pre-removal script subprocess returned error exit status 2
dpkg: too many errors, stopping
update-alternatives: using /usr/bin/emacs-gtk to provide /usr/bin/emacs (emacs) in auto mode
chdir /var/lib/emacsen-common/state/flavor/installed: No such file or directory at /usr/lib/emacsen-common/lib.pl line 27.
dpkg: error while cleaning up:
 installed emacs-gtk package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 emacs-gtk
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

已经做了一段时间了。任何帮助都将不胜感激。

答案1

运行sudo apt purge emacs*以自动选择 glob。

相关内容