How to install a package and force downgrade of all its needed dependencies
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".
Related videos on Youtube
Sogartar
Updated on September 18, 2022Comments
-
Sogartar over 1 year
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 triedapt-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
-
karel over 3 yearsDoes this answer your question? Install packages from newer release without building (apt pinning)
-