apt-get install -t testing appX VS apt-get install appX/testing

Solution 1:

I was having the same problem, but I figured it out!!!

(I originally wanted to comment this on the original answer because other people seem to be having this problem too, but I didn't have enough magic "reputation" points at the time for my opinion to be valuable, so here goes.)

It's a quirk of the values he chose for apt-pinning. When you run apt-get install my_package, apt chooses which source to install that package from based on whichever has the highest pinning priority.

Your overall system setting (Default Release) has a priority of 990.

Adding -t unstable to the apt-get command temporarily makes "unstable" the Default Release for that command.

He set up his Pinning Priority for "stable" to be 995. That means that no matter what, packages will always be installed from stable since its priority is even higher than the Default Release priority.

So the fix? Easy - just change the pin priority in /etc/apt/preferences.d/security.pref from 995 to 900.