3

I'm running 64-bit Debian Wheezy. Recently when I do apt-get upgrade I get this:

The following packages have been kept back:
  libsmbclient libtevent0 samba-libs

It's driving me crazy. I though I just remove samba as I don't use it anyway but some genius made Gnome depend on it:

# apt-get remove libsmbclient
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  gnome gnome-core gvfs-backends libgnomevfs2-extra libsmbclient mencoder mplayer

How do I upgrade those packages safely?

Not much of custom stuff installed:

deb http://ftp.pl.debian.org/debian/ wheezy main 
deb-src http://ftp.pl.debian.org/debian/ wheezy main 

deb http://security.debian.org/ wheezy/updates main 
deb-src http://security.debian.org/ wheezy/updates main 

# wheezy-updates, previously known as 'volatile'
deb http://ftp.pl.debian.org/debian/ wheezy-updates main 
deb-src http://ftp.pl.debian.org/debian/ wheezy-updates main 

# wheezy-backports
deb http://ftp.pl.debian.org/debian/ wheezy-backports main contrib non-free

# virtualbox
deb http://download.virtualbox.org/virtualbox/debian/ wheezy contrib

[UPDATE]

What I tried:

  1. apt-get dist-upgrade - result is the same (packages have been kept back).
  2. used aptitude, but all it suggests is to remove gnome and few other gnome related packages and install whole lot of i386 packages (looks like libs only).
  3. apt-get install libsmbclient gives libsmbclient : Depends: samba-libs (= 2:4.1.9+dfsg-1~bpo70+1) but it is not going to be installed
  4. apt-get install libtevent0 gives libtevent0 : Depends: libtalloc2 (>= 2.1.0) but 2.0.7+git20120207-1 is to be installed.
  5. apt-get install samba-libs gives samba-libs : Depends: samba-dsdb-modules (= 2:4.1.9+dfsg-1~bpo70+1) but it is not going to be installed

[UPDATE 2]

It seems that the source of this issue lies somewhere in backports repository. I was experimenting with bumblebee and also some DVD ripping stuff once and I remember that I had to install something from backports. I don't need it any more. Bumblebee failed anyway for my hardware and DVD was ripped on Windows in the end :(

Now I did aptitude search '~S ~i ~Abackports' and got this:

i   initramfs-tools                   - generic modular initramfs generator
i A libavutil53                       - Libav utility library
i   libldb1                           - LDAP-like embedded database - shared library
i A libnettle4                        - low level cryptographic library (symmetric and one-way cryptos)
i A libntdb1                          - New Trivial Database - shared library
i A libopus0                          - Opus codec runtime library
i   libswscale2                       - Libav video scaling library
i A libtdb1                           - Trivial Database - shared library
i A libwbclient0                      - Samba winbind client library
i A python-talloc                     - hierarchical pool based memory allocator - Python bindings
i   samba-common                      - common files used by both the Samba server and client

I think that I should downgrade these packages and everything should be fine. Am I right? How should I do that?

[UPDATE 3]

I tried to remove or downgrade those packages from backports repo and managed to do it only partially.

When I wanted to downgrade libntdb1 I realized that it doesn't exist in stable repo. When I tried to remove it - again, apt wanted to remove gnome too. When I did apt-cache rdepends libntdb1 it turned out that only reverse dependency is samba-libs. There is no samba-libs in stable repo too AND I can't remove it either because yet again, it tries to remove gnome and whole lot of stuff. What the hell is going on here? Note that samba-libs is not listed when I do aptitude search '~S ~i ~Abackports'. How to get rid of this thing?

Also, when I tried to downgrade libldb1 and libwbclient0 I couldn't because apt wanted to remove gnome in both cases. Why?

So now I ended up with three packages from backports repo listed with aptitude search '~S ~i ~Abackports':

i   libldb1              - LDAP-like embedded database - shared library
i A libntdb1             - New Trivial Database - shared library
i A libwbclient0         - Samba winbind client library

AND samba-libs that apparently also comes from backports but is not listed with aptitude search '~S ~i ~Abackports'

5
  • Why do you need to update those packages ? They're probably being kept back because if you upgrade them, it will break some dependency somewhere else. Also, have you tried apt-get install samba-dsdb-modules ? – Lawrence Jul 28 '14 at 1:06
  • @Lawrence Actually I would be happy to just remove them as I don't use samba at all. It seems that one of these packages (or at least one in dependency chain) was accidentally installed from backports repo when I was experimenting with bumblebee :( At least I think so after browsing through aptitude. Maybe it would be good thing to downgrade all packages from backport to current wheezy? – SiliconMind Jul 28 '14 at 10:33
  • @Lawrence apt-get install samba-dsdb-modules gives: The following packages have unmet dependencies: libdcerpc0, libgensec0, libsamdb0 but it is not going to be installed – SiliconMind Jul 28 '14 at 10:34
  • I would just leave it be. There's no real benefit to removing or upgrading those packages. – Lawrence Jul 29 '14 at 4:14
  • Does this answer your question? apt says packages have been kept back, what to do? Also on Unix and AskUbuntu – Pablo A Jan 8 '20 at 22:15
4
+50

It's possible to downgrade deb packages to specific repo using apt:

# apt-get install libsmbclient/wheezy libtevent0/wheezy samba/wheezy
  • The "[package]/wheezy" construct means user want package from wheezy repo only and not newest one.
  • It's important to specify all desired packages in one go, so that apt can resolve dependencies correctly and pull other wheezy packages.

If apt doesn't prompt about deleting important packages you want to keep, it's good to go. There shall be a few warnings about dependency problems, but you're safe to ignore those warnings as long as they are not fatal.

After downgrade is successful, the libraries like libtevent0, libldb1 etc are no more needed. You can use apt-get --purge autoremove and/or deborphan (if it's installed) to find and clean orphaned packages not useful on system.

(My previous answer shall be invalidated, will delete soon, it's incorrect anyway -- it's possible to downgrade with apt)

2
  • I did use apt to downgrade but the problem is that samba-libs and libntdb1 don't exist in current stable repo :( – SiliconMind Jul 31 '14 at 11:36
  • Yes, and you do notice there's no samba-libs and libntdb1 listed in command I listed above, right? The intention is to downgrade all necessary packages from wheezy only, so that those packages from wheezy-backport are orphaned. – Abel Cheung Jul 31 '14 at 13:34
2

I use the interactive package solver of aptitude:

run sudo aptitude. Then type U (that is capital u) to say you want to upgrade it all. It will tell you that there are conflict, and will make a proposal to solve it. use e to enter the interactive solver, and then . (dot) and , (comma) to iterate over the different solution it will find, then ! to accept one of the solution.

You can also try to help it finding a better solution (for you) by moving to a part of a solution (where for example it propose to remove gnome) and tell it that you want to accept (with A) or refuse (with R) that it does it.

2
  • Suggested solution is to remove gnome. This is really dumb. Other options are to remove 153 packages and install 97 new ones - this doesn't look too good. – SiliconMind Jul 12 '14 at 10:13
  • The packages it suggests to install are all i386 – SiliconMind Jul 12 '14 at 10:22
1

Quickest & Easiest Solution:

You must install each package individually.

See this Superuser solution: apt packages kept back solution

Warning: Do NOT run sudo apt-get dist-upgrade until after you've completely installed the packages that you need installed. AFTER, and ONLY AFTER that, can you run sudo apt-get update & sudo apt-get dist-upgrade

0
sudo -i
apt-get update
apt-get upgrade
apt-get dist-upgrade

Generally packages kept back if they didnt dependencies/supported libraries.

Do that & I am sure it will help you.

2
  • Did that already and it doesn't work. dist-upgrade also throws The following packages have been kept back – SiliconMind Jul 12 '14 at 10:33
  • 'apt-get dist-upgrade' did the trick for me. – MjrKusanagi Dec 26 '14 at 22:35
0

Open up a Terminal and type:

apt-cache rdepends packagename

and replace packagename with your package you want to remove and it will list the packages that need the package you are trying to remove, remove those packages first and then try to remove the actual package.

5
  • This won't work. If I try to do apt-get remove libsmbclient apt wants to also remove gnome and removing gnome means also removing whole lot of stuff. Not the solution I'm looking for. – SiliconMind Jul 28 '14 at 10:13
  • @SiliconMind then you simply can't remove it! If you did that manually than gnome wont work as expected, period. – OverCoder Jul 28 '14 at 13:34
  • that's why I'm trying to resolve this issue in some other way. As I wrote before in my comments, I'm experiencing this probably due to to versioning issues caused by some updates from backports repo. – SiliconMind Jul 28 '14 at 13:42
  • @SilliconMind you won't be able to remove it as long as gnome depends on it, however you can uninstall gnome and install KDE as a replacement even though it's kind of silly, why do you want to remove that package anyway? – OverCoder Jul 28 '14 at 13:46
  • I don't need it, but that's not the point. The point is that I get this stupid kept back thing every time I upgrade my debian. I want this to be resolved to make sure that my system is up to date and not broken. – SiliconMind Jul 28 '14 at 13:52
0

Downgrading samba related packages manually without apt may be able to resolve problem. Grab the deb packages from mirror (remember to choose wheezy repository ones), and install them with dpkg -i. If in doubt, search on packages.debian.org for the correct version.

And remember to drop the backport repo from sources.list if it is no more needed.

(This answer is obsolete, I posted another)

4
  • Should I drop backport repo before or after I downgrade? – SiliconMind Jul 28 '14 at 22:05
  • Doesn't matter because package downgrading doesn't involve using apt. – Abel Cheung Jul 28 '14 at 22:13
  • I tried downgrading those packages but succeeded only partially - please see my last update to the question. – SiliconMind Jul 30 '14 at 11:18
  • @SiliconMind OK, will try to reproduce your environment, and if successful I'll post another answer and delete this one if you won't mind. – Abel Cheung Jul 30 '14 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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