I usually do apt-get dist-upgrade instead of a mere apt-get upgrade for consistency reasons. However, for the first time on one of my RaspberryPis I got the following:

# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
The following NEW packages will be installed:
The following packages will be upgraded:
1 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
Need to get 4,692 B/134 kB of archives.
After this operation, 940 kB disk space will be freed.
Do you want to continue [Y/n]?

Why does it want to remove upstart again? I intentionally installed upstart and of course sysvinit and upstart are mutually exclusive.

# apt-cache depends sysvinit
  Depends: libc6
  Depends: libselinux1
  Depends: libsepol1
  Depends: debianutils
  PreDepends: initscripts
 |PreDepends: sysv-rc
  PreDepends: file-rc
  PreDepends: sysvinit-utils
# apt-cache depends upstart
  Depends: libc6
  Depends: libdbus-1-3
  Depends: libjson0
  Depends: libnih-dbus1
  Depends: libnih1
  Depends: libselinux1
  Depends: libudev0
  Depends: sysvinit-utils
  Depends: sysv-rc
  Depends: initscripts
  Depends: mountall
  Depends: ifupdown
  Depends: udev
  Suggests: python
  Suggests: graphviz
  Suggests: bash-completion
  Conflicts: <lxcguest>
  Conflicts: <startup-tasks>
  Conflicts: <system-services>
  Conflicts: sysvinit
  Conflicts: <upstart-compat-sysv>
  Conflicts: <upstart-job>
  Breaks: cryptsetup
  Breaks: <friendly-recovery>
  Breaks: libc6
  Replaces: <startup-tasks>
  Replaces: <system-services>
  Replaces: sysvinit
  Replaces: <upstart-compat-sysv>
  Replaces: <upstart-job>

Likely that the upgraded python3-pifacedigital-scratch-handler package has sysvinit as a dependency, which apt then tries to install, which conflicts with upstart, so it tries to remove upstart.

You can check that by running apt-cache show python3-pifacedigital-scratch-handler and checking the Depends: section to see if it is depending on a certain package.

  • Hmm, it doesn't seem to depend directly. Possible there are dependencies of dependencies that cause this. What's odd is that this difference appears to be from apt-get upgrade vs. apt-get dist-upgrade. – 0xC0000022L Nov 15 '13 at 17:04
  • 1
    The difference is from the fact that apt-get upgrade will upgrade any software that doesn't require packages removed or new packages to be installed. - The man page of apt-get states - Packages currently installed with new versions available are retrieved and upgraded; under no circumstances are currently installed packages removed, nor are packages that are not already installed retrieved and installed. New versions of currently installed packages that cannot be upgraded without changing the install status of another package will be left at their current version. – Lawrence Nov 18 '13 at 0:51
  • yeah, that's what the docs state. But the question is rather why, if upstart (according to package meta-info replaces sysvinit) if I choose to install the former, sysvinit wants back in. Also see unix.stackexchange.com/q/101330/5462 ... looks like this would be a big according to Gilles' comment. – 0xC0000022L Nov 18 '13 at 0:57
  • 1
    apt isn't intelligent enough to determine that upstart replaces sysvinit, and thus upstart is fine to leave. Apt just reads that this package needs sysvinit, goes to install it, and removes upstart as a result. - that's if I'm reading your question right. – Lawrence Nov 18 '13 at 1:00

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.