The base software for Debian/Ubuntu/Mint package management. Use this tag for questions about dpkg and its companion utilities and the .deb file format.

learn more… | top users | synonyms

138
votes
5answers
25k views

I deleted /bin/rm. How do I recover it?

Just for fun, I thought I would use this command on my Raspberry Pi running Raspbian: sudo rm -f /bin/rm I thought I could just reinstall coreutils: I was wrong! apt-get install --reinstall ...
121
votes
12answers
51k views

What are the pros/cons of deb vs. rpm?

For whatever reasons, I've always used RPM based distros (Fedora, Centos and currently openSUSE). I have often heard it stated that deb is better than rpm, but when asked why, have never been able to ...
21
votes
4answers
32k views

Install from a deb file, by dpkg -i or by apt?

I have a deb package for installation. Shall I install by dpkg -i my.deb, or by apt? Will both handle the software dependency problem well? If by apt, how can I install from the deb by apt?
20
votes
1answer
59k views

“E: Sub-process /usr/bin/dpkg returned an error code (1) ” What does this mean?

I've seen this message several times whenever someone has a problem installing, upgrading or removing some piece of software, but I wonder, what does it mean, and more importantly, is possible to ...
18
votes
6answers
5k views

What's .deb and .rpm and how is it different from .msi?

What are these file formats and how do they differ from the .msi format in Windows? Also what are the pros and cons of these package management schemes?
16
votes
1answer
208 views

dpkg replacing files on a FAT filesystem

When you upgrade or reinstall a package with dpkg (and ultimately anything that uses it, like apt-get etc) it backs up the existing files by creating a hard link to the file before replacing it. That ...
12
votes
3answers
18k views

Installing a .deb package in home directory

Is it possible to install a .deb package completely under my home directory at debian?
11
votes
2answers
9k views

What packages are installed by default in Debian? Is there a term for that set? Why some of those packages are `automatically installed` and some not?

It's a very simple question, but I wonder, is there a term to refer to the subset of packages that is automatically installed by Debian distribution? I though that it had something to do with ...
11
votes
1answer
2k views

How to make dpkg faster?

Package (un)installation on a Debian system is horribly slow, partly because it works with a whole bunch of (small) files. Short of getting faster storage, how do I speed it up? I'm thinking maybe ...
11
votes
4answers
1k views

How can I reliably “hold” a package in Debian?

I have a package in Debian that has been manually patched (not ideal, I know) that I must hold at its current version so upgrades don't overwrite the patched changes (I will manually inspect and apply ...
10
votes
3answers
4k views

feeding input values to dpkg-reconfigure in non-interactive way

I would like to configure ubuntu package via dpkg-reconfigure with all the values supplied via non-interactive mode (in the script). In fact my case is firebird confiiguration ...
8
votes
2answers
234 views

Re-installing apps after a fresh install?

I'm on Debian and I want to re-partition my drive and reinstall. Is there an easy way to restore all currently installed packages after a fresh installation? I'm thinking of doing it by making a ...
7
votes
3answers
584 views

Why do package managers need lock files?

dpkg uses a lock file (/var/lib/dpkg/lock), when in use. Why are these lockfiles needed? Why are multiple instances not possible?
5
votes
1answer
5k views

dpkg cannot find ldconfig/start-stop-daemon in the PATH variable

I was trying to install bsd-mailx utility the package got installed however I am wondering about the error. This is the error I get: Preconfiguring packages ... dpkg: warning: 'ldconfig' not found ...
5
votes
2answers
4k views

I cannot install new packages: “Could not get lock /var/lib/dpkg/lock”

I am new to Linux (installed Ubuntu for the first time yesterday), and have never dealt with any unix-based OS. I started using Linux for the sole purpose of collaborating code with my partners via ...
5
votes
1answer
567 views

dpkg, apt, synaptic. aptitude: can user customizations cause conflicts?

So, I ssh into a (very) remote Ubuntu 10.4 server to do some admin and web dev+design. And I was looking through the various package manager options. There's a lot. The big ones are dpkg, apt, ...
5
votes
1answer
13k views

Not able to lock /var/lib/dpkg/lock (read only)

I was trying to install ruby on my remote server(this is a vm machine(debian) in a esxi server . ) I got this error: The Command: sudo apt-get install ruby1.8 Error : W: Not using locking for read ...
5
votes
2answers
587 views

Does Debian's dpkg store the time/date of package changes (.i.e. installation/purges)?

I know that dpkg and dpkg-query are good tools to find out about packages currently installed on a Debian system. Besides the information logged to the files /var/log/dpkg.log.* is there any other ...
5
votes
4answers
224 views

Install a .deb completely 'by hand'

So, I recently acquired a brand new Nokia N900 phone off of an online auction site for a fairly reasonable price. The N900 is a Linux phone, and it came out a long time ago, but it's only just now ...
5
votes
1answer
506 views

Firefox circular-dependency hell on Linux Mint 13

Having difficulty re-installing Firefox, after an installation to resolve places.sqlite issues. It appears that I'm trapped in circular dependency hell. Need to resolve firefox dependency hell to ...
4
votes
3answers
1k views

How to list currently not installed packages?

I'd like to output a list of all, currently not installed, packages (they are visible in Synaptic for example) using only shell commands. How do I do this?
4
votes
2answers
355 views

Debian: prevent particular file from being overwritten during package upgrade

I understand that a package has two components: config and data files. During package upgrade (i.e. security upgrade) data files can be overwritten, but config files should always stay the same. Also ...
4
votes
3answers
2k views

Can I determine what changed in an upgraded package using apt or dpkg on Debian 6?

I just did an apt-get upgrade on my Debian 6 development server and noticed that a certain package named tinyproxy was upgraded. I have a particular interest in seeing precisely what changed in that ...
4
votes
3answers
64 views

How to find out if a specific package is installed on Debian?

I'm working with a Raspberry Pi B+ and Raspbian 5/5/2015 and some guides that are a few years old. I've got an external NTFS HDD hooked up to the Pi. Due to the articles age(s), common practices ...
4
votes
1answer
2k views

How to configure the MySQL APT repo on Ubuntu, on a non-interactive shell?

I want to install MySQL 5.7 on Travis CI, which runs Ubuntu 12 virtual machines. I'm willing to use the official MySQL APT repo: wget ...
4
votes
3answers
937 views

Can removed Debian packages have leftover files?

I noticed a weird thing in my /etc/init.d files and tried to look a bit what was going on. Here's my problem: # apt-file search /etc/init.d/minissdpd minissdpd: /etc/init.d/minissdpd # ...
4
votes
1answer
10k views

I can't install new packages and can't update and upgrade

I'm trying to install some program on Ubuntu, but when I try it I got the following error.- E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock ...
4
votes
2answers
87 views

Sort installed applications according by usage frequency?

My / is running low. So I am considering freeing up some space by uninstalling some packages. “Which installed software packages use the most disk space on Debian?” already covers sorting by size, but ...
4
votes
2answers
945 views

Debian dpkg broken after apt-get upgrade

I have been running Debian Wheezy for a long time. Today I ran a dpkg upgrade, which has somehow broken things badly. The upgrade aborted, and now apt-get and dpkg are not running. # dpkg dpkg: error ...
4
votes
1answer
99 views

Installed using apt-get, then ran out of storage

I attempted to install a large package, forgetting that I had little space left, and now I am a little stuck. When I attempt to remove any packages I get the following error: E: dpkg was ...
4
votes
1answer
1k views

listing packages in Debian, a la `dpkg -l`, but including the package origin/source

I want to list all packages of the form $ dpkg -l libav\* but in addition to this output, I would like the origin/source (I'm not sure of the preferred term) of each package. If the package doesn't ...
4
votes
1answer
210 views

How do I replicate installed package selections from one Debian system to another? (Debian Wheezy)

I am trying to set up a staging environment in a VM, in order to test updates before applying them to my main system. In order to do so, I have done a basic installation of Debian Wheezy (same as on ...
4
votes
1answer
1k views

Unable to remove openmediavault package due to postrm script error

I'm a Unix noob so struggling a bit with the commands. Managed to set up SABnzb, Sickbeard and Couch Potato and all working nicely I have a problem with Ubuntu 12.04 server. When trying to upgrade or ...
4
votes
2answers
26 views

How to influence order of package upgrade (apt-get upgrade/dist-upgrade)

We are hosting a branch of the debian jessie repository with custom, backported and patched packages. Every product release an ISO installer is created from this repo. We now noticed that an upgrade ...
4
votes
1answer
306 views

Backtrace of “git clone” running inside qemu-user-emulation based arm-chroot

I'm running a wheezy:armhf chroot using qemu user emulation on my jessie:x86_64 system. Somehow, a git clone on a particular private repository will hang inside the chroot, while succeed natively. ...
4
votes
1answer
2k views

How to fix zramswap error?

I installed zramswap-enabler on Ubuntu 11.10 using the ppa but when installing programs or running system upgrades I get this error: Setting up zramswap-enabler (0.2.1-0~12~oneiric1) ... start: Job ...
4
votes
1answer
81 views

Sharing code between dpkg scripts

What is the standard way to share code between the dpkg scripts (preinst, postinst, prerm, postrm)? I can see how to share code between just postinst and prerm (by installing it as part of the ...
3
votes
4answers
6k views

How to recreate /var/lib/dpkg/status?

I have deleted some files around /var/lib/dpkg/, namely: /var/lib/dpkg/status /var/lib/dpkg/available /var/lib/dpkg/info/* I understand Debian uses these files to keep some information about ...
3
votes
2answers
10k views

dpkg: dependency problems prevent configuration of initramfs-tools

I started an upgrade of my Kubuntu 12.04 system with this command, as usual: sudo apt-get --show-upgraded dist-upgrade I came back later and it had failed: Preconfiguring packages ... (Reading ...
3
votes
2answers
3k views

How to remove Dropbox

I am trying to remove Dropbox from my computer. So far I have done the following: sudo aptitude remove dropbox sudo aptitude purge dropbox But this didn't get rid of it 100% oshiro@debian:~$ ...
3
votes
3answers
296 views

How it is possible that dpkg isn't neccesary for installing deb packages?

The information below seems misleading. I am confused with the example they give that if you lose dpkg (the program that lets you handle .deb files) you can use the other commands ar, tar, and gzip ...
3
votes
3answers
395 views

List all software installed from particular component (non-free, contrib)

Is there a way to list all non-free and contrib software installed in Debian via apt? /etc/apt/sources.list is as follows deb http://ftp.us.debian.org/debian/ wheezy main non-free contrib deb-src ...
3
votes
3answers
60 views

Unpacking a .deb file containing a MIPS binary

I'm trying to install openssh server on a router and need a MIPS compiled binary. I've downloaded the one from here but encounter an error upon extraction: $ sudo dpkg --unpack ...
3
votes
1answer
511 views

Why does grep change the length of output lines?

I often use dpkg or aptitude combined with grep when I want to list certain packages available or installed on my system, but I noticed that when I add | grep, the output lines look a little bit ...
3
votes
2answers
5k views

List of installed programs without running a program in the system

My Linux Mint 15 broke and there seems to be no way to fix it. I cannot boot it so I haven't got access to the terminal. What I'm going to do is make a backup of /home with a flash disk running Mint ...
3
votes
5answers
324 views

Get package sources and repository link

Is there any way (dpkg, apt?) to get a package's sources and URL to repository, if available, in Debian ?
3
votes
2answers
52 views

apt - checking if a similar package has been installed

This question explains how to find out if a given Debian package has been installed, but it does not take into account "synonyms" when installing via apt-get. For instance, if I try apt-get install ...
3
votes
1answer
126 views

Is it possible to have a Debian package pre-install script run apt-get commands?

I'm creating a Debian package that has a few dependencies not found in the official repositories. Simply specifying these other packages as dependencies doesn't cut it, as their installations alone ...
3
votes
1answer
979 views

After creating a .deb: dpkg:warning while removing, directory /usr/local/bin not empty so not removed

I have created a package of zsh 5.0.7 from sources and now I can install it successfully but when I try to remove it I get this: $ sudo dpkg -i zsh_5.0.7_amd64.deb Selecting previously unselected ...
3
votes
1answer
2k views

Is dpkg available for Cygwin?

I don't use Windows all that often, but I've found my self in a position where I'm stuck in front of one quite a bit temporarily. So I've been investigating Cygwin. My question is dpkg available for ...