I am using Debian(buster)I would like to download a specific version of a package. To accomplish this I added the required repository to the system and ran the apt-get update command. Also I use 'apt-cache-madison "package-name" to verify that the package i need it available and it does show up. So when i run the command to install the package "apt-get install 'package'='version_number' " it says that the Version 'the version i specified' was not found for 'package'. Any suggestions?

2 Answers 2


You need to check the package for the availability before :

apt policy <package>
apt-cache madison <package>
apt list -a <package>

If the desired version isn't available, that's mean the package cannot be installed.

Here is an example:

~$ apt policy linux-image-amd64

  Installed: (none)
  Candidate: 4.19+105+deb10u8
  Version table:
     5.9.6-1~bpo10+1 100
        100 http://deb.debian.org/debian buster-backports/main amd64 Packages
        100 /var/lib/dpkg/status
     4.19+105+deb10u8 500
        500 http://deb.debian.org/debian buster/main amd64 Packages
     4.19+105+deb10u7 500
        500 http://security.debian.org/debian-security buster/updates/main amd64 Packages

From the output 3 version are allowed to be installed 4.19+105+deb10u7, 4.19+105+deb10u8 and 5.9.6-1~bpo10+1. To simulate the installation:

sudo apt install -s linux-image-amd64=4.19+105+deb10u7
  • Thanks for your response. I used the apt policy <package> as you suggested and the version that I want to download does show up. I tried to install the package while specifying the repo with the -t command but it still tells me the package is not found. Jan 14, 2021 at 15:12
  • 1
    @manhasnoname could you add the package name, please.
    – GAD3R
    Jan 14, 2021 at 16:28
  • I figured it out. It was an error in my sources file. Thanks for all your help Jan 18, 2021 at 21:28

You can target the package version with the repository name.

Assuming your package is in Testing, you can use

apt-get install <package>/testing


apt-get install <package> -t testing

The first command only installs the corresponding package, the second one installs both package and dependencies from testing

Be sure to read about "FrankenDebian" (these advises apply for every Linux distribution) before installing packages from another repo

  • Thanks for your response. I tried using the -t flag as you suggested but I'm still getting the same error. Just to confirm the name of the repo is what you specify in the /sources.list file ? You can name your repo whatever you would like? Jan 14, 2021 at 15:14
  • I don't know for the naming. Here is an abstract of my file /etc/apt/sources.list : deb http://ftp.belnet.be/debian testing main contrib
    – roneo.org
    Jan 14, 2021 at 21:14

You must log in to answer this question.

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