(emacs-nox) uninstall fails, with no modifications

Bug #2079732 reported by Loren McIntyre
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
emacs (Ubuntu)
New
Undecided
Unassigned

Bug Description

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)

Revision history for this message
Loren McIntyre (mcint) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.