1

I ran a regular apt-get upgrade followed by apt-get dist-upgrade. After I clicked on the 'Yes' as usual, the dist-upgrade started removing a lot of important packages and when I scrolled up in the terminal, I saw this to my surprise:

$ 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:
 account-plugin-aim account-plugin-jabber account-plugin-salut
 account-plugin-yahoo accountsservice aisleriot aptdaemon apturl audacious
 avahi-daemon avahi-utils bluez bluez-alsa brasero checkbox-gui checkbox-ng
 checkbox-ng-service colord compiz compiz-gnome consolekit cron dbus dbus-x11
 deja-dup-backend-gvfs empathy exo-utils friendly-recovery gconf2 gcr gdm
 gksu gnome-applets gnome-applets-data gnome-bluetooth gnome-control-center
 gnome-disk-utility gnome-keyring gnome-media gnome-power-manager
 gnome-screensaver gnome-session gnome-session-bin gnome-session-flashback
 gnome-settings-daemon gnome-shell gnome-sushi gnome-system-log
 gnome-user-share gpointing-device-settings gstreamer0.10-gconf gvfs
 gvfs-backends gvfs-daemons gvfs-fuse hplip indicator-bluetooth
 indicator-datetime indicator-power indicator-session indicator-sound kate
 kde-runtime kdelibs5-plugins kdepim-runtime kleopatra konsole krdc
 kubuntu-debug-installer landscape-client-ui-install language-selector-common
 language-selector-gnome lib32nss-mdns libbonoboui2-0 libcalendarsupport4
 libcanberra-pulse libexo-1-0 libgarcon-1-0 libgksu2-0
 libgnome-media-profiles-3.0-0 libgnome2-0 libgnome2-bin libgnome2-common
 libgnomeui-0 libgnomevfs2-0 libgnomevfs2-common libincidenceeditorsng4
 libkateinterfaces4 libkdepim4 libkdepimdbusinterfaces4 libmailcommon4
 libmailimporter4 libmessagecomposer4 libmessagecore4 libmessageviewer4
 libnss-mdns libnss-mdns:i386 libnss-mdns-i386:i386 libpam-systemd
 libpimcommon4 libpolkit-qt-1-1 libqapt2-runtime libreoffice-gnome
 libswt-gnome-gtk-3-jni libtemplateparser4 libthunarx-2-0 libunique-1.0-0
 libxfce4ui-1-0 libxfce4ui-utils libxfconf-0-2 lightdm
 mcp-account-manager-uoa mountall nautilus nautilus-sendto
 nautilus-sendto-empathy nautilus-share network-manager network-manager-gnome
 nfs-common oneconf orage pidgin pidgin-libnotify plainbox-provider-checkbox
 plainbox-provider-resource-generic plymouth plymouth-label
 plymouth-theme-ubuntu-logo plymouth-theme-ubuntu-text policykit-1
 policykit-1-gnome printer-driver-postscript-hp pulseaudio
 pulseaudio-module-bluetooth pulseaudio-module-x11 python-secretstorage
 python-ubuntu-sso-client python3-checkbox-ng python3-checkbox-support
 python3-plainbox qapt-batch remmina remmina-plugin-rdp remmina-plugin-vnc
 rhythmbox rhythmbox-mozilla rhythmbox-plugin-cdrecorder
 rhythmbox-plugin-magnatune rhythmbox-plugin-zeitgeist rhythmbox-plugins
 seahorse sessioninstaller shotwell software-center sound-juicer
 systemd-services telepathy-salut thunar thunar-volman totem-mozilla
 transmission-gtk ubuntu-desktop ubuntu-minimal ubuntu-release-upgrader-gtk
 ubuntu-session ubuntu-sso-client ubuntu-sso-client-qt ubuntu-standard
 ubuntu-system-service udisks2 unity unity-control-center
 unity-control-center-signon unity-settings-daemon unity-tweak-tool
 update-manager update-notifier upower upstart ureadahead usb-creator-common
 usb-creator-gtk webaccounts-extension-common xdiagnose xfce4 xfce4-appfinder
 xfce4-mixer xfce4-notifyd xfce4-panel xfce4-session xfce4-settings
 xfce4-volumed xfconf xfdesktop4 xfwm4 xul-ext-webaccounts y-ppa-manager
The following NEW packages will be installed:
 apparmor-easyprof apparmor-easyprof-ubuntu click click-apparmor
 cryptsetup-bin gir1.2-click-0.4 gir1.2-gee-0.8 libclick-0.4-0
 libcontent-hub0 libcryptsetup4 liblttng-ust-ctl2 liblttng-ust0 libsctp1
 libupstart-app-launch2 liburcu1 linux-headers-3.13.0-73
 linux-headers-3.13.0-73-generic linux-image-3.13.0-73-generic
 linux-image-extra-3.13.0-73-generic lksctp-tools lxpolkit lxsession-data
 python3-apparmor python3-apparmor-click python3-click python3-libapparmor
 qtdeclarative5-ubuntu-content0.1 sysvinit
The following packages will be upgraded:
 linux-generic linux-headers-generic linux-image-generic openjdk-7-jdk
 openjdk-7-jre openjdk-7-jre-headless
6 upgraded, 28 newly installed, 198 to remove and 0 not upgraded.'

Well for one thing, it broke my aptitude. I checked the sources files in apt where all was well. When I tried to do a apt-get install -f, it scared me with this:

WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  sysvinit
0 upgraded, 7 newly installed, 1 to remove and 9 not upgraded.
2 not fully installed or removed.
Need to get 1,013 kB of archives.
After this operation, 4,424 kB of additional disk space will be used.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
?] no 
Abort.

That's something I'd have loved to see when dist-upgrade removed all of those packages to install sysvinit. Anyways, since it also broke my network I had to route the host through the guest which connected using USB tethering(host's USB) and I got all of those packages back to bring the system back to stability.

Out of curiosity, I tried doing a dist-upgrade again and it still says the same thing. I want to run dist-upgrade to get these packages upgraded: linux-generic linux-headers-generic linux-image-generic openjdk-7-jdk openjdk-7-jre openjdk-7-jre-headless because the regular apt-get upgrade doesn't touch them.

My first question is: how do I upgrade these packages without getting the other beloved packages removed?

And the second question obviously is: is it normal that dist-upgrade makes the system unstable? Shouldn't it replace the packages it removes with something better in case they were removed because of incompatibility with the new packages dist-upgrade wanted to install on the system?

Regarding the possible duplicate flag: I did not add a PPA in the past month.

Donbhupi
  • 149
  • From the log it looks like sysvinit was installed ( but not properly) when you ran apt-get dist-upgrade to begin with. That is why install -f is trying to remove it. – Ron Dec 17 '15 at 15:47
  • @DavidFoerster what? – Ron Dec 17 '15 at 15:47
  • @Ron yes sysvinit is right there at the end of new packages to be installed... I wonder why does dist-upgrade think my system needs it and why does it want to remove all those crucial packages? – Donbhupi Dec 17 '15 at 15:59
  • If a package upgrade requires the removal of basic system or desktop packages, it's most likely due to a dependency conflict. These are rarely introduced with packages exclusively from Canonical's official repositories. Hence, this is an issue of dependencies with third-party packages as addressed in the linked question. – David Foerster Dec 17 '15 at 16:00
  • @DavidFoerster I've been scouring the internet to find a possible duplicate for the past day but the one you have posted isn't even a first cousin of my question I'm afraid... – Donbhupi Dec 17 '15 at 16:01
  • @DavidFoerster added more details to explain how it isn't the question that you referred to. – Donbhupi Dec 17 '15 at 16:06
  • @Donbhupi: The cause can be a PPA, that you added years ago, but a change to that PPA or another repository (by the maintainer) introduced or exposed a dependency issue. – David Foerster Dec 17 '15 at 16:12
  • 1
    @DavidFoerster thanks caught the culprit: debian-squeeze repo. wonder how long and why it had been sitting there... will try to delete the question if that's feasible. – Donbhupi Dec 17 '15 at 16:16

1 Answers1

2

Thanks to David's pointers and my research on sysvinit over the past few days, I found out the cause of this to be this debian repo : deb http://ftp.de.debian.org/debian squeeze main

As soon as I commented it out and updated the sources, I got rid of the incorrect dist-upgrade suggestions.

Even though I haven't totally cured my ignorance on the difference between sysvinit and upstart, all I know from my research is that Ubuntu had replaced sysvinit with (POSIX)upstart when Adam was a boy (although Trusty still has a valid candidate for sysvinit that may cause troubles by deleting upstart like it did on my system).

$ cat /etc/apt/sources.list | egrep -v "^#|trusty|^$"
deb http://ftp.de.debian.org/debian squeeze main
deb http://www.emdebian.org/debian/ squeeze main

This is essentially how I located the non-trusty repos. Just commenting out the first one did the trick.

If you accidentally remove these packages, do not restart the system for obvious reasons; the desktop environment is robust enough to work until a reboot even if it is removed. Then, try to see how you can get network; there's only so little you can do with the control-center out and no network-manager on the system. I employed the hack of using two network interfaces on a VM I had running on the VirtualBox and then routed the traffic from the host(ubuntu) through the guest which got its internet from USB tethering.

And then just go ahead and type "Yes, do as I say!", when aptitude asks this:

After this operation, 4,424 kB of additional disk space will be used.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'

Weird how aptitude didn't even care a little while removing upstart but got upset when it came to sysvinit!

Donbhupi
  • 149