package base-files 12ubuntu4.2 failed to install/upgrade: subprocess new pre-removal script returned error exit status 1

Bug #2008151 reported by Raj Parihar
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
base-files (Ubuntu)
New
Undecided
Unassigned

Bug Description

my dpkg dir is delete how to recover

ProblemType: Package
DistroRelease: Ubuntu 22.04
Package: base-files 12ubuntu4.2
ProcVersionSignature: Ubuntu 5.19.0-32.33~22.04.1-generic 5.19.17
Uname: Linux 5.19.0-32-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.3
Architecture: amd64
CasperMD5CheckResult: unknown
Date: Thu Feb 23 07:24:22 2023
ErrorMessage: subprocess new pre-removal script returned error exit status 1
InstallationDate: Installed on 2022-10-18 (127 days ago)
InstallationMedia: Ubuntu 20.04.2.0 LTS "Focal Fossa" - Release amd64 (20210209.1)
Python3Details: /usr/bin/python3.10, Python 3.10.6, python3-minimal, 3.10.6-1~22.04
PythonDetails: N/A
RelatedPackageVersions:
 dpkg 1.21.1ubuntu2.1
 apt 2.4.8
SourcePackage: base-files
Title: package base-files 12ubuntu4.2 failed to install/upgrade: subprocess new pre-removal script returned error exit status 1
UpgradeStatus: Upgraded to jammy on 2022-10-26 (119 days ago)

Revision history for this message
Raj Parihar (rajp7jowa) wrote :
information type: Private Security → Public
affects: ubuntu → base-files (Ubuntu)
tags: removed: need-duplicate-check
Revision history for this message
Seth Arnold (seth-arnold) wrote :

Your logs suggest that your /usr/bin/dpkg has been corrupted. There is no easy way to recover from this situation.

If you have another computer of the same architecture and running the same release, you can copy the /usr/bin/dpkg file from one computer to the other. If you don't have this, you can use apt download dpkg to download the dpkg package, use ar x to unpack the dpkg package, and then tar xf the data.tar.* file that was created. Then you can copy the usr/bin/dpkg from that over your /usr/bin/dpkg.

Good luck.

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.