-   Linux - Newbie (
-   -   Debian: apt setup for apt-pinning (

<Ol>Origy 05-29-2011 11:38 PM

Debian: apt setup for apt-pinning
Okay, I rarely post topics here, but I think this one fits into a newbie section. :-/

Here's the deal. I'm running a stable version of Debian 6, and I would like to install a package from the unstable (sid) repo. Now most tutorials on google suggest that I should edit my /etc/apt/preferences and /etc/apt/apt.conf files to add a few lines. I have checked the /etc/apt folder and the two mentioned files do not exist. But two directories with similar names do: /etc/apt/preferences.d/ and /etc/apt/apt.conf.d/

This confuses me. Should I simply create the "preferences" and "apt.conf" files like the tutorials suggest or is this some form of different apt configuration where appropriate files have to be put inside these folders (like apache2 which uses sites-enabled and sites-available instead of one large httpd.conf file)?


andrewthomas 05-29-2011 11:58 PM

Anything that the tutorial says to put in /etc/apt/preferences can be put in a file in /etc/apt/preferences.d/ directory and the same with /etc/apt/conf.d

<Ol>Origy 05-30-2011 09:11 AM

And I take it that it is irrelevant what the file name is as long as it resides in one of those two directories, yes?

andrewthomas 05-30-2011 08:48 PM


sumeet inani 05-31-2011 06:01 AM

Reminds me of my debian squeeze.

I create file <any-name>.list containing

deb file:/root <folder>/
in /etc/apt/sources.list.d when I create Packages.gz file ( in /root/<folder> ) locally using 'dpkg-scanpackages' .

So I don't touch /etc/apt/sources.list
Then 'apt-get update' adds my local packages in 'apt-cache' list.

craigevil 05-31-2011 09:33 AM

Take a look at:
AptPreferences - Debian Wiki -
Apt-Pinning for Beginners -
Chapter*2.*Debian package management -

All of the info you need is in the Debian docs and/or the wiki.

All times are GMT -5. The time now is 08:43 AM.