0

I would like to remove obsolete packages from my Raspberry Pi 2, so, I removed all the extra source packages of my Raspbian Jessie, and left only the official Raspbian mirrors:

deb http://archive.raspbian.org/raspbian jessie main contrib non-free rpi
deb-src http://archive.raspbian.org/raspbian jessie main contrib non-free rpi

(I also included mirrordetector sources)

Then, I ran the command (after apt-get update)

apt-show-versions | grep -i "no available version"

which showed me the following packages to be obsolete:

gcc-4.5-base:armhf 4.5.3-12+rpi1 installed: No available version in archive
libboost-iostreams1.46.1:armhf 1.46.1-8 installed: No available version in archive
libboost-iostreams1.48.0:armhf 1.48.0-3 installed: No available version in archive
libdb5.1:armhf 5.1.29-5 installed: No available version in archive
libdrm-amdgpu1:armhf 2.4.71-1+rpi1 installed: No available version in archive
libdrm-tegra0:armhf 2.4.71-1+rpi1 installed: No available version in archive
libgcrypt11:armhf 1.5.0-5+deb7u3 installed: No available version in archive
libgnutls26:armhf 2.12.20-8+deb7u3 installed: No available version in archive
libllvm3.9:armhf 1:3.9-4 installed: No available version in archive
libprocps0:armhf 1:3.3.3-3 installed: No available version in archive
libraspberrypi-bin:armhf 1.20161215-1 installed: No available version in archive
libraspberrypi-dev:armhf 1.20161215-1 installed: No available version in archive
libraspberrypi-doc:armhf 1.20161215-1 installed: No available version in archive
libraspberrypi0:armhf 1.20161215-1 installed: No available version in archive
libwayland-bin:armhf 1.11.0-2 installed: No available version in archive
minecraft-pi:armhf 0.1.1-4 installed: No available version in archive
omxplayer:armhf 0.3.7~git20160923~dfea8c9 installed: No available version in archive
penguinspuzzle:armhf 20120902-1 installed: No available version in archive
pypy-upstream:all 4.0.1+dfsg-1+rpi1 installed: No available version in archive
python-minecraftpi:armhf 0.1.1-4 installed: No available version in archive
python-picamera:armhf 1.12 installed: No available version in archive
python-pifacecommon:all 4.2.1-1 installed: No available version in archive
python-pifacedigitalio:all 3.1.0-1 installed: No available version in archive
python-rpi.gpio:armhf 0.6.3~jessie-1 installed: No available version in archive
python3-minecraftpi:armhf 0.1.1-4 installed: No available version in archive
python3-picamera:armhf 1.12 installed: No available version in archive
python3-pifacecommon:all 4.2.1-1 installed: No available version in archive
python3-pifacedigital-scratch-handler:all 2.0.5-1 installed: No available version in archive
python3-pifacedigitalio:all 3.1.0-1 installed: No available version in archive
raspberrypi-artwork:all 20150921 installed: No available version in archive
raspberrypi-bootloader:armhf 1.20161215-1 installed: No available version in archive
raspberrypi-kernel:armhf 1.20161215-1 installed: No available version in archive
raspi-config:all 20161207 installed: No available version in archive
raspi-copies-and-fills:armhf 0.5-1 installed: No available version in archive
rpi-update:all 20140705 installed: No available version in archive

I removed them all, and that broke my Debian Jessie! It won't boot anymore, and it won't even start with HDMI (even if I enable hotplug).

Luckily, I kept an image of the SD card, so I restored the image, tried again, and verified that this is the cause. Obviously I'm removing some important packages, so my question is:

So my question is: What are the correct sources of these packages that I have to keep for Debian Jessie? And how can I clean up obsolete packages without breaking my Raspbian?

Please ask if you require additional details.

  • 3
    Did you really think you would get away with removing raspberrypi-bootloader and raspberrypi-kernel? Don't those names sound kind of important? – Dmitry Grigoryev Jan 31 '17 at 8:20
  • @DmitryGrigoryev lol... didn't know how essential that is. I thought RPi is just like normal computers, and worst-case would be some kind of easy recovery. It's disappointing though that these libraries are not available for Debian Stretch. – The Quantum Physicist Jan 31 '17 at 8:22
  • Those are not libraries but the bootloader and Linux kernel, respectively. AFAIK you can't run that kernel directly with Stretch, but you can get lots of Stretch updates via jessie-backports – Dmitry Grigoryev Jan 31 '17 at 8:48
  • @DmitryGrigoryev Actually it did work with stretch. But some drivers weren't working properly as I heard, such as CEC. – The Quantum Physicist Jan 31 '17 at 8:59
0

apt-show-versions is not a standard tool, and the way that you're using it isn't reporting obsolete files, just those that aren't in the repo or in your cache. If you want to save space, apt-get autoremove and apt-get clean will clean up superfluous installed packages and empty your download cache without breaking your system.

  • 1
    Sir, I think your answer is incorrect. First, if you're concerned about standard tools, then you have to know that aptitude provides the same result with aptitude search '~o'. If you're running a high security Linux system, you should do this test very frequently. Obsolete packages create a huge risk for Linux systems because they don't get security updates. If you're concerned about security, I suggest you research a little more on this. – The Quantum Physicist Jan 31 '17 at 6:18
  • Well, you didn't tell us that you were trying to upgrade to stretch and that you'd removed the raspberrypi.org hardware repo, the actual cause of your problems. apt-show-versions run as a user returns far too many packages (for me) to be a reliable indicator of what's obsolete. – scruss Jan 31 '17 at 16:08
0

It turns out the sources I mentioned in my question are not sufficient. There is this following repos that is important as it contains hardware bindings (apparently) of raspberry pi. The library names suggest that.

deb http://archive.raspberrypi.org/debian/ jessie main

Btw, this repos doesn't have bindings for Debian Stretch, although the primary bindings may work there. Debian Stretch was the reason why I started this fiasco.

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.