Occasionally, my Raspbmc upgrades itself, downloading and installing new kernels and xbmc. How would I keep the other packages up-to-date?

I'm not sure if it's recommended, but I tried sudo apt-get upgrade followed by sudo apt-get dist-upgrade. It seems like some packages are put on hold, although surprisingly, others were still uninstalled. Should I not have run these commands?

$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
  libnss-winbind libpam-winbind samba
The following packages have been kept back:
  libwbclient0 samba-common smbclient winbind xbmc
0 upgraded, 0 newly installed, 3 to remove and 5 not upgraded.
After this operation, 21.8 MB disk space will be freed.
Do you want to continue [Y/n]? 
(Reading database ... 33369 files and directories currently installed.)
Removing libnss-winbind:armhf ...
Removing libpam-winbind:armhf ...
Removing samba ...
[ ok ] Stopping Samba daemons: nmbd smbd.

Subsequent attempts at sudo apt-get upgrade and sudo apt-get dist-upgrade resulted in no packages being upgraded or installed.

$ dpkg --get-selections | grep hold
initscripts                 hold
insserv                     hold
libavahi-client3:armhf      hold
lsb-base                    hold
lsb-release                 hold
manpages                    hold
network-manager             hold
rsyslog                     hold
udev                        hold
upstart                     hold
winbind                     hold
xinetd                      hold

1 Answer 1


upgrade will never alter which packages are installed, it will only update those that are installed to the latest version it can. It will not upgrade a package if that would require installing new dependencies, and it will not remove unnecessary packages.

dist-upgrade will (un)install dependencies as needed. As far as I know, it’s equivalent to install [list of all explicitly installed pkgs] (but there may be differences). This is good, dependencies are bound to change, and you want your system to reflect that, obviously.

Aside: Some people say dist-upgrade is dangerous (e.g., if you have stuff that depends on certain packages, but does not declare this [which is bad form, I’d say]). If you’re in a production environment and want your system to be as stable as possible, then this might be a concern. For the record: If you are worried, use install [package you care about] to selectively "dist-upgrade" only some packages, rather than all.

Assuming you don’t use your Pi for mission-critical stuff, dist-upgrade does exactly what you want, so you’re good. There’s no need to run both, by the way, because d-u will do what u does and more.

As for packages being held back: This probably due to (at the moment) unresolvable dependencies, but should go away once those deps are available.

  • A few things: this question is (partially) specific to Raspbmc. In the past, apt-get upgrade was not recommended, and could kill the system. Also, what do you mean by "should go away once those deps are available"? AFAIK they are available; as per my last command, they are manually held back.
    – Sparhawk
    Aug 4, 2014 at 2:50
  • If Raspbmc put a hold on those pkgs, they apparently don't want you to update them. I didn't know that Raspbmc handles things differently, sorry. (My opinion is that if dist-upgrade let alone a simple upgrade can break the system, then there's something wrong with that design.)
    – tjanson
    Aug 4, 2014 at 11:26
  • IIRC I think there was some discussion about why previous iterations of Raspbmc didn't disable apt-get upgrade totally, although I guess this would prevent upgrade of manually-install packages. But yes, I agree that if it can still break the system, it's a suboptimal setup.
    – Sparhawk
    Aug 4, 2014 at 13:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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