How to download and extract a .deb package on Ubuntu or Debian Linux

Sometimes you require a certain file from a Debian .deb package. For example, because you accidentally deleted a file. Or because the package’s installation is faulty and it can’t be restored without first adding the missing file. This FAQ explains how to extract the contents of a.deb file downloaded from the Debian or Ubuntu repository.

Save the Debian package file to your computer. I’ll download the dovecot package in this example:

cd /tmp
apt-get download dovecot

Now extract the .deb package into the directory /tmp/extract/:

Sponsored
dpkg-deb -x *.deb /tmp/extract/

The post How to download and extract a .deb package on Ubuntu or Debian Linux

Sponsored
appeared first on FAQforge.
Ubuntu Server Admin

Recent Posts

NVIDIA DGX Spark: The developer’s personal AI supercomputer built on an Ubuntu base

The history of computing is a story of incredible change, but not every revolution happens…

1 day ago

Ubuntu Weekly Newsletter Issue 913

Welcome to the Ubuntu Weekly Newsletter, Issue 913 for the week of October 5 –…

2 days ago

Ubuntu 25.10 (“Questing Quokka”) released

Ubuntu 25.10, codenamed “Questing Quokka”, is here. This release continues Ubuntu’s proud tradition of integrating…

6 days ago

Canonical releases Ubuntu 25.10 Questing Quokka

The latest interim release of Ubuntu comes with compatibility enhancements at the silicon level, accessibility…

6 days ago

Ubuntu worker nodes for OKE now in Limited Availability

Oracle Kubernetes Engine now supports Ubuntu images for worker nodes natively, with no need for…

6 days ago

OpenStack cloud – happy 15th anniversary!

Happy birthday, OpenStack! It’s astonishing how fast time flies – fifteen years already. Yet, here…

1 week ago