Skip to main content
110 votes

How to install a deb file, by dpkg -i or by apt?

You can install a local .deb package by: sudo apt install ./foo.deb Make sure to specify a local relative or absolute path (./ if in current dir), otherwise it will look for foo.deb in the remote ...
wisbucky's user avatar
  • 3,518
81 votes

How to install a deb file, by dpkg -i or by apt?

Here's the best way to install a .deb file on Ubuntu on the command-line: sudo gdebi skype.deb If you don't have gdebi installed already, install it using sudo apt install gdebi-core. Why gdebi? ...
Flimm's user avatar
  • 4,287
67 votes

dpkg: error: cannot remove architecture 'i386' currently in use by the database

Run dpkg --get-selections | awk '/i386/{print $1}' And then if happy with them being removed, run apt-get remove --purge `dpkg --get-selections | awk '/i386/{print $1}'` And then retry the dpkg -...
steve's user avatar
  • 22.1k
56 votes

Upgrading nodejs on Ubuntu: How to fix broken pipe error?

All of this didn't work for me. What worked was: sudo dpkg --remove --force-remove-reinstreq libnode-dev sudo dpkg --remove --force-remove-reinstreq libnode72:amd64 via
dirkk0's user avatar
  • 686
43 votes

Is it possible to build a Linux distro supporting both RPM and .deb packages?

I didn’t think there are any distributions out there which support both natively, but it turns out there is one in development, Bedrock Linux (thanks to iMalinowski for the information). On other ...
Stephen Kitt's user avatar
32 votes

Automatically install unmet build dependencies as detected by dpkg-checkbuilddeps

I use mk-build-deps from the devscripts package for this (you’ll also need equivs). mk-build-deps will build a package depending on all the build-dependencies in the debian/control control file; that ...
Stephen Kitt's user avatar
32 votes
Accepted

zst compression not supported by apt/dpkg

Debian’s dpkg package didn’t support zstd compression prior to version 1.21.18. Support was added just in time for Debian 12. I’m guessing you’ve added a Ubuntu PPA; you shouldn’t use those with ...
Stephen Kitt's user avatar
30 votes
Accepted

How to convince dpkg that libssl1.0.2 is >= libssl1.0.0?

libssl1.0.2 and libssl1.0.0 are different packages, providing incompatible libraries; that’s why you can’t satisfy a libssl1.0.0 dependency using libssl1.0.2. To satisfy your package’s requirements, ...
Stephen Kitt's user avatar
29 votes
Accepted

How can I list all files which have been installed by an APT package?

-L, --listfiles dpkg -L package-name
Paul Nordin's user avatar
  • 1,212
27 votes
Accepted

Is it possible to build a Linux distro supporting both RPM and .deb packages?

Bedrock Linux does this. Not saying I've done this, or that it is a good idea, but it is being done.
Henry Malinowski's user avatar
25 votes

Right way to get the list of installed packages matching a pattern?

$ apt list --installed "linux-image-*" 2>/dev/null |awk -F'/' 'NR>1{print $1}' linux-image-3.16.0-4-amd64 linux-image-4.11.0-1-amd64 linux-image-4.12.0-1-amd64 linux-image-4.13.0-1-amd64 linux-...
George Vasiliou's user avatar
25 votes
Accepted

How may I obtain information on a specific Debian package (.deb) file?

To get lots of information about the package use -I or --info: dpkg-deb -I package.deb dpkg-deb --info package.deb To only get the version use, -f or --field: dpkg-deb -f package.deb Version dpkg-...
alpha's user avatar
  • 2,004
24 votes
Accepted

Use dpkg to view changelog

dpkg does not provide any facility to read the changelog of a package. you should extract the package and read the changelog dpkg -X <package.deb> <folder> then you can read the ...
Diego Roccia's user avatar
24 votes
Accepted

Can installing an unknown deb package using sudo dpkg be harmful?

Yes, packages can contain “maintainer scripts” which are run before and/or after installation. You can see the scripts, if any, by extracting the control archive from the package: dpkg-deb --ctrl-...
Stephen Kitt's user avatar
21 votes

How to check progress of unattended-upgr process? Should I kill it?

You can see the latest entry in the log file e.g. /var/log/unattended-upgrades/unattended-upgrades-dpkg.log, try tail /var/log/unattended-upgrades/unattended-upgrades-dpkg.log
JuanPi's user avatar
  • 311
20 votes

Get package sources and repository link

for latest version: apt-get download --print-uris package | cut -d' ' -f1 for specific version apt-get download --print-uris package=version | cut -d' ' -f1
Omriko's user avatar
  • 301
20 votes

Upgrading nodejs on Ubuntu: How to fix broken pipe error?

You need to enable the universe repository which provide the missing dependencies libnode72 (= 12.18.2~dfsg-1ubuntu2) and nodejs-doc (12.18.2~dfsg-1ubuntu2) in Ubuntu 20.10 : sudo add-apt-repository ...
GAD3R's user avatar
  • 67.7k
19 votes
Accepted

How to install libxcb

The way you built libxcb is OK, but as Julie Pelletier says you didn't need to build it from source. The general approach in a case like this is to use apt-cache search; apt-cache search libxcb will ...
Stephen Kitt's user avatar
17 votes
Accepted

In Debian, which package is responsible for creation of /etc/default/grub?

In such cases you can find the relevant package by looking through the post-installation scripts: grep /etc/default/grub /var/lib/dpkg/info/*.postinst This reveals that the file is created by grub-...
Stephen Kitt's user avatar
17 votes
Accepted

Any possible conflict between using both --force-confold and --force-confnew with dpkg?

This is addressed in the dpkg man page: confnew: If a conffile has been modified and the version in the package did change, always install the new version without prompting, unless the --force-...
Stephen Kitt's user avatar
17 votes

zst compression not supported by apt/dpkg

If you are running Debian < 12 and need to install a .deb package that uses zstd, you can repack it: # Extract files from the archive ar x some-package.deb # Uncompress zstd files an re-compress ...
Quique's user avatar
  • 271
16 votes

How to find out half-configured/broken packages in Debian?

Quick to type: dpkg -l | grep -v '^ii' This lists any package that's at least a little known to the system but not perfectly installed. If you want parseable output, use dpkg-query with a custom ...
Gilles 'SO- stop being evil''s user avatar
16 votes

Abort failed `dpkg --configure -a`

Try first by manually cleaning the package: sudo mv /var/lib/dpkg/info/PACKAGE.* /tmp/ sudo dpkg --remove --force-remove-reinstreq PACKAGE
nicoX's user avatar
  • 335
16 votes

How to find out the variable names for debconf-set-selections?

You can get the variables for a specific installed package using debconf-show packagename ex. $ sudo debconf-show mysql-server-5.7 * mysql-server/root_password: (password omitted) * mysql-server/...
steeldriver's user avatar
  • 82.2k
16 votes
Accepted

Is there an apt --force-overwrite option?

The correct (tm) solution to this is to fix the dependencies of foo-a and foo-b by fixing debian/control with: Package: foo-b Replaces: foo-a (<< 2.0) Breaks: foo-a (<< 2.0) Reference: ...
Stewart's user avatar
  • 14.4k
15 votes
Accepted

Force non-interactive "dpkg --configure" when using apt-get install

This kind of configuration file change conflict is dealt with by dpkg, and you can force it to choose the default option using the --force-confdef option. Do heed the warning from the documentation ...
Stephen Kitt's user avatar
14 votes

Right way to get the list of installed packages matching a pattern?

aptitude supports searching among all packages known to the package management tools, installed or otherwise, using regular expressions, without extraneous output, and can be told how to format its ...
Stephen Kitt's user avatar
13 votes

How to check if HDF5 is installed?

You can try running h5cc -showconfig: SUMMARY OF THE HDF5 CONFIGURATION ================================= General Information: HDF5 Version: 1.8.12
Julio Freitas's user avatar
13 votes

Upgrading nodejs on Ubuntu: How to fix broken pipe error?

Just delete nodejs-doc: sudo apt remove nodejs-doc
Metin Celik's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible