Ubuntu – /etc/apt/preferences file is missing

apt

I should pinning and set priority to Ubuntu repository for installing Kolab mail server. I just added the following to sources.list,

deb http://mirror.kolabsys.com/pub/ubuntu/kolab-3.0/ precise release updates
deb-src http://mirror.kolabsys.com/pub/ubuntu/kolab-3.0/ precise release updates

but for adding

Package: *
Pin: origin mirror.kolabsys.com
Pin-Priority: 501

I can not find any "preferences" file in /etc/apt/. I searched in Google a lot, but I didn't find anythings. Even in the "preferences.d" directory there is not any "preferences" file.
I should mention that I am using Ubuntu 12.04.

How can I make the /etc/apt/preferences file?

Best Answer

By default there is no /etc/apt/preferences file.

You can create it with a user who has sudo access:

sudo touch /etc/apt/preferences
sudo nano /etc/apt/preferences
<PASTE THE PINNING DATA IN>
Related Question