Public bug reported:

Uninstall fails on error from scripts unique to package.

$ sudo apt install emacs-nox
$ sudo apt purge emacs-nox
...
Removing emacs-nox (1:27.1+1-3ubuntu5.1) ...
update-alternatives: alternative /usr/bin/emacs for editor not registered; not 
removing
update-alternatives: alternative /usr/bin/emacs-nox for emacs not registered; 
not removing
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-nox (--remove):
 installed emacs-nox package pre-removal script subprocess returned error exit 
status 2
dpkg: too many errors, stopping
update-alternatives: error: alternative path /usr/bin/emacs-nox doesn't exist
dpkg: error while cleaning up:
 installed emacs-nox package post-installation script subprocess returned error 
exit status 2
Errors were encountered while processing:
 emacs-nox
Processing was halted because there were too many errors.
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)


Description:    Ubuntu 22.04.4
LTS Release:        22.04


$ apt-cache policy emacs-nox
emacs-nox:
  Installed: 1:27.1+1-3ubuntu5.1
  Candidate: 1:27.1+1-3ubuntu5.1
  Version table:
 *** 1:27.1+1-3ubuntu5.1 500
        500 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 
Packages
        100 /var/lib/dpkg/status
     1:27.1+1-3ubuntu5 500
        500 https://mirror.enzu.com/ubuntu jammy/universe amd64 Packages
        500 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: emacs-nox 1:27.1+1-3ubuntu5.1
ProcVersionSignature: Ubuntu 6.5.0-45.45~22.04.1-generic 6.5.13
Uname: Linux 6.5.0-45-generic x86_64
NonfreeKernelModules: zfs
ApportVersion: 2.20.11-0ubuntu82.6
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: KDE
Date: Thu Sep  5 16:32:25 2024
SourcePackage: emacs
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: emacs (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug jammy third-party-packages

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2079732

Title:
  (emacs-nox) uninstall fails, with no modifications

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/emacs/+bug/2079732/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to