21

I am running 12.04 Precise beta (upgraded from 11.10 Oneiric) and I added the following line to my /etc/apt/source.list:

deb http://http.us.debian.org/debian unstable main contrib non-free

In order to get a newer version of a package (octave 3.6) that I needed but was not available in the precise repository.

This worked fine, but now when I want to upgrade there is a large number of packages that need to get updated. I assume this is because sid has newer versions of many of the packages than precise.

I've temporarily disabled the sid repository, and this works fine - however I am curious to know what would happen if I allowed all those upgrades to go through? Would it break my system? Are the structures of Ubuntu Precise and Debian Sid repositories fundamentally different somehow?

1
  • I think the answer we might be missing here is how to add the signing keys so that Ubuntu can trust the packages from Debian Sid. All other answers seem to say "don't do this."
    – jmort253
    Jul 4, 2023 at 1:55

6 Answers 6

25

You're mixing two different distributions' packages together. For various reasons, this is a bad idea:

  • Security.

  • Stability.

  • Conflicting updates, which you have right now.

  • If you let above updates go through, you encounter the first two problems, and then you're in deep trouble if say, as an example a kernel update comes through!

Also, this makes getting an accurate bug report or stacktrace almost impossible, if not entirely impossible.

In short, if you need Debian sid, run sid. Otherwise, run Ubuntu, and just add newer software you want to via a PPA or backports.

More explanations here:

1
  • 2
    It's fine to use Debian repositories to get an updated software. Sometimes there is no other option, because PPA or backports don't contain the version you are looking for. Sometimes you need it to get the latest drivers for hardware. Just don't use Debian repos as standard repos, only exceptionally. Feb 16, 2017 at 0:59
11

This might be necessary if you need a package currently not available in your ubuntu release.

My suggestion is to use apt-pin.

I created /etc/apt/preferences.d/unstable with following content

Package: *
Pin: release v=12.04, l=Ubuntu
Pin-Priority: 1000

Package: *
Pin: release a=unstable
Pin-Priority: 600

This ensures that the basic distribution always takes precedence. In case a package is not available, unstable is chosen.

1
  • 1
    A very underrated answer. apt-pin is the way to deal with installing things from the unstable branch without messing up the current system. Thank you @koppor for sharing this one, 8 years later, it is still the correct way.
    – Lockszmith
    May 29, 2022 at 2:57
5

If you do that, it may seem to work initially. What it means is you're getting the packages before Ubuntu customizes/changes things.

Using part of one and part of the other takes away a LOT of ability to troubleshoot issues from both sides. Debian users won't be able to help you as much because much of your distro is Ubuntu. Ubuntu users won't be able to help you as much because some of your distro is Debian.

It's a great thing to do if you're trying to get a package into a ppa/repo. Distribution wide, it's probably not a great idea in my opinion.

2

You don't need a Debian sid repository to install the latest release of a package (octave 3.6)..

There is a PPA in Launchpad for this.

1
2

If you want to take third party deb packages, I suggest you download them one by one, and then install them one by one using gdebi (of course, you have to install gdebi first).

Gdebi is a great tool to install deb package manually. Gdebi will tell you the dependency chain of the applicatio you want and you could install them with safe. If in the end you don't get all dependencies satisfied, it is better and more safe to install it from source.

1
  • Or you can just use dpkg...
    – strugee
    Jun 2, 2013 at 6:45
1

Chances are things may break. not recommended

Development with Debian --long reading--lets just say they work together

How Ubuntu Works

1
  • That's fine and all, but Debian has a driver that I need that isn't in Ubuntu for some reason.
    – Yehuda
    Jun 3, 2022 at 14:17

You must log in to answer this question.

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