2

Mainly on a debian/apt-get based system (but answers for others like Arch would be nice too).

Doing apt-get install package installs the latest version of "package" available and (if necessary) upgrades all dependencies to whatever version is needed by the latest version of "package".

Is there a way to attempt to install, not the absolute latest version of a package, but the latest version that would not require updating any already existing dependencies?

2

2 Answers 2

1

Not directly, no, as a result of how the package lists and mirrors work.

In order for the package manager to be able to do this, it would need to know not just the dependencies of every package in the system, but the dependencies of every package at every point in time in the past. This would start to get bloated pretty quickly.

Secondly, and more importantly, we have to think about the mirrors. Mirrors are, by and large, run by volunteers, and by their nature, take up a fair bit of disk space. As a result, mirrors generally sync up with the canonical sources via an rsync operation that deletes any files that aren't present on the source - so old versions of packages are deleted. This is why in a quickly-moving distro (like Arch), sometimes performing an "install" command without first doing an "update" command will result in a 404 - the latest version your local package manager knows about has been replaced. For something like what you suggest to happen, mirrors would have to drastically expand their disk usage to keep around old versions of packages.

Most distros also test on the most updated (for that release) packages, so by using an unpatched system you're getting into unsupported territory.

From a security perspective, too, you really want to always be as up to date with your distro as possible.

Overall, you should be staying updated. If there's something that's preventing you from doing this, you should reconsider that situation and see if you can solve it.

0

Although it is highly recommended to keep all packages (including dependencies) up-to-date. I think your requirement can be achieved as follows. This might be beating around the bush a little.

Run the command apt-get --print-uris --yes install package

This will give you the URLs of the all the packages which would have been installed by apt.

Manually download your main package (.deb) file alone. And, install using the dpkg command.

dpkg -i package.deb

This will work as long as you already have all the minimum required versions of the dependency packages.

If still unsuccessful, try using the --force-all with dpkg.

Warning : Try only for applications. Do Not try for system packages. Will get you in trouble, if there is any breakage

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .