Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to upgrade my Debian Lenny to Squeeze. I've replaced the word lenny to squeeze in sources.list and ran

apt-get clean
apt-get update
apt-get dist-upgrade

But after a while, I get this error

Preconfiguring packages ...
Setting up debian-archive-keyring (2010.08.28) ...
ERROR: Can't find the archive-keyring
Is the ubuntu-keyring package installed?
dpkg: error processing debian-archive-keyring (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

So I tried to install apt-get -f install debian-archive-keyring and I got the same error. Then I tried to install apt-get -f install ubuntu-keyring and I got this error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package ubuntu-keyring is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package ubuntu-keyring has no installation candidate

Maybe I have the wrong sources in my sources.list:

deb  squeeze          main contrib non-free
deb  squeeze/updates  main contrib non-free

deb  squeeze  main non-free contrib
deb-src  squeeze  main non-free contrib

deb  squeeze/updates  main contrib non-free
deb-src  squeeze/updates  main contrib non-free

Hope anyone can help me,

thx, tux

Thank you both for the answers. @mailq I also was wondering why there is an Ubuntu package missing/wrong. I'm running a Debian Lenny on my server, and tried to upgrade to squeeze. So, I replaced the words lenny with squeeze in my sources.list. And this is, what comes out: Some Ubuntu errors (???). The first sources are the local sources of my provider and second sources are, as Gilles said, the official (but slower) sources of Debian.

@Gilles Here is the output of the commands:

# lsb_release -irc
Distributor ID: Ubuntu
Release:    10.04
Codename:   lucid

# type apt-key
apt-key is /usr/bin/apt-key

# dpkg -s apt
Package: apt
Status: install ok installed
Priority: important
Section: admin
Installed-Size: 5488
Maintainer: Ubuntu Core Developers <>
Architecture: amd64
Replaces: libapt-pkg-dev (<< 0.3.7), libapt-pkg-doc (<< 0.3.7)
Provides: libapt-pkg-libc6.10-6-4.8
Depends: libc6 (>= 2.8), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.4.0)
Recommends: ubuntu-keyring
Suggests: aptitude | synaptic | wajig, dpkg-dev, apt-doc, bzip2, lzma, python-apt
 /etc/apt/apt.conf.d/01autoremove 6154750d39a78704b5bbf6fafd65ada7
 /etc/apt/apt.conf.d/01ubuntu 078b96538a377743bee0f554eb5b2fc6
 /etc/logrotate.d/apt 179f2ed4f85cbaca12fa3d69c2a4a1c3
 /etc/cron.daily/apt 3528ddf873535d4c268d83e73e85dc79
Description: Advanced front-end for dpkg
 This is Debian's next generation front-end for the dpkg package manager.
 It provides the apt-get utility and APT dselect method that provides a
 simpler, safer way to install and upgrade packages.
 APT features complete installation ordering, multiple source capability
 and several other unique features, see the Users Guide in apt-doc.
Original-Maintainer: APT Development Team <>

I only wanted to upgrade to Debian Squeeze, and I don't know how this Ubuntu stuff happens. A new installation isn't a good idea, because I'm running this server in production and don't want some downtime.

So, any further ideas?

thx, tux

share|improve this question
I finally come to the point to reinstall my system. Something in the update process went terrible wrong. 4 hours of work, but now everything is up to date and ok ;) – 23tux Dec 10 '11 at 12:28

The message “Is the ubuntu-keyring package installed?” comes from the apt-key program, which manages keyrings for APT. You evidently have the apt-key program from Ubuntu, not from Debian. Since the apt-key program is part of the apt package, there's something deeply wrong here. Are you sure this machine has Debian installed, and not Ubuntu? Check the output of lsb_release -irc (if lsb_release is present) or the version of the base-files package. Also check where your apt-key program is coming from: type apt-key, dpkg -s apt.

If you have Ubuntu, you can't upgrade to Debian (or vice versa). The two distributions use the same package format and have many packages in common, but there are enough difference that it would take some effort to support such cross-distribution upgrades, and there is hardly anyone interested in expending such effort. So if you have an older Ubuntu release (hardy, maybe?), keep it, upgrade to a new Ubuntu, or reinstall.

share|improve this answer

Ubuntu?! What do ubuntu-keyrings have to do with Debian?

Eliminate the first both lines in the sources.list. Or the other four. But don't list them twice.

share|improve this answer
Indeed, that ubuntu-keyring message shouldn't come up on a Debian. On the other hand, there's nothing wrong with having more than one mirror for the same distribution in sources.list. It's a standard configuration when you have a partial local mirror, for instance (hit the local mirror first, and fall back to the full official mirror over a slow link). – Gilles Nov 21 '11 at 0:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.