Skip to main content

Update Error: dpkg error code 1

·152 words·1 min
Posts error ubuntu sysadm
Table of Contents
An essential troubleshooting guide for Sysadm.

Recently, I come across update error code 1 while updating my Ubuntu. And this isn’t the first time it happens.

It can be in different formats, such as:

subprocess installed post-installation script returned error exit status 10
E: Sub-process /usr/bin/dpkg returned an error code (1)
dpkg: error processing package dpkg (--configure):
 installed dpkg package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 dpkg

Quick Resolution
#

  1. Remove post info files of those troubleshome package.
$ sudo mv /var/lib/dpkg/info/dpkg.* /tmp

Note that package name can be others, such as openssh-server.* or dpkg.*.

  1. Use force install.
$ sudo apt install -f 
  1. Reconfigure package database.
$ sudo dpkg --configure -a 

Root Cause
#

Most likely, the package got corrupted while installing a package. Usually reconfiguring fix the problem. And if a package installation was interrupted previously, then force installing is needed to resolve it.

Related

Cloud Native Tools
·517 words·3 mins
Posts 101 cloud tools
What are CSPM, CWPP, and CIEM?
Oracle Cloud Free Tier
·257 words·2 mins
Posts cloud free oracle
Build, test and deploy application on a Linux server in Oracle Cloud - for FREE.
VulnCheck KEV Community
·330 words·2 mins
Posts kev python tools vulncheck threatmgmt vulnmgmt
Introducing the VulnCheck Known Exploited Vulnerabilities (KEV) catalog, a free community database of known exploited vulnerabilities fused with exploit intelligence.