Virtual Bookkeeping Services for Small Business

Many small business owners do not have enough knowledge, resources or time to do bookkeeping in-house. They often have to opt for expensive outsource bookkeeping services, hire tax consultants or…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




How to install packages from a newer distribution without installing unwanted

Debian and Ubuntu only.

We have an older version of distribution on a server and we want to install some (but not all) packages from a newer distro. We absolutely don’t want to have squall of system updates from the newer distribution and we want only few packets. To make it simple I’ll focus on ‘one packet’ case.

I will give example of package whois installed from xenial to trusty.

Step 1: Add new repository to apt sources. Normally it’s done by duplicating line in /etc/apt/sources.list (or corresponding file in the /etc/apt/sources.list.d). In this example before change we have file /etc/apt/sources.list with following content:

After adding a new source:

(please, be careful, as without later steps any apt-get update command will screw your system).

Step 2: Add preferences file for apt: /etc/apt/preferences.d/somename.pref:

Step 3: apt-get update

Step 4: check if policy worked:

whois is coming from our new repo:

and libc-bin(an example of a very important system package we don’t want to upgrade) is coming from the older repo:

It’s really important to check if pinning is actually holding other packages on the old repo!

Now we can easily install newer version: apt-get upgrade, or just apt-get install whois.

And if we ever wonder about pinned packages, they all are listed at the end of apt-cache policy output:

Add a comment

Related posts:

4 Types of Customer Interviews

This can be a symptom of skipping a foundational step: clarifying what specifically you’re looking to understand from your customer. It’s tempting to cram one than one type into a typical 30–45…

Mi a Tett?

2017-re a magyar levegő megváltozott. Nem egyszerűen amiatt, hogy a választás elő évébe értünk, ami a szokottnál jobban is kiélezi a közélet ellentmondásait, hanem azért is, mert az egész világunk…

What Should I say?

Five BLACK cops beat a young BLACK man to death in Memphis. And they liked it! Oh yes they did. No one could commit this act with such gusto if this wasn’t a fantasy come true. Just wailed on this…