6

Let's say I have a package mypack. It has a ton of dependencies, that have a ton of dependencies themselves. I want to install it in one step where also all its dependencies are automatically downgraded. I have tried

apt-get --allow-downgrades --allow-change-held-packages install mypack

But it refuses to downgrade some installed packages.

If some other package or some of its dependencies conflicts with a dependency of mypack it should remove the other package.

Is there an available solution or I have to write the script myself?

Update

I tried installing a specific version but in some cases it does not work.

apt-get --allow-downgrades --allow-change-held-packages install mypack=1.2.3
Sogartar
  • 181
  • 1
  • 1
  • 6
  • Does this answer your question? [Install packages from newer release without building (apt pinning)](https://askubuntu.com/questions/103320/install-packages-from-newer-release-without-building-apt-pinning) – karel Sep 29 '20 at 14:24

1 Answers1

1

This may not work in your situation, but I ran into the same thing and I was able to solve it by setting the packages in the repository to have a higher installation priority than the currently-installed packages:

cat << EOF > /etc/apt/preferences.d/99tmp
Package: *
Pin: origin ""
Pin-Priority: 1001
EOF

^^ note that I was using a local repository, so you likely need something like "Pin: origin deb.debian.org".

Compholio
  • 356
  • 2
  • 7