Skip to content

Comment on Debian 7.3 is outparent

Comments

It truly confuses me that the upgrade instructions are so obfuscated, bordering on unfindable. Can someone point me to the chapter where an upgrade from 7.1 to this version is covered?

http://www.debian.org/releases/stable/amd64/release-notes/in...

apt-get update && apt-get upgrade

There's nothing special about upgrading Debian between point releases.

There's nothing special...except for the actual commands. Empathize with the newbie.

You're right. What I meant was that doing your regular system updates is enough to upgrade from 7.1 to 7.3, there's nothing special you need to do on top of that.

You are supposed to run those commands every day, not just with a point release.

When the newbie installed debian in the first place they were (should have been) told to do that.

(And yes there is a tool that will do it automatically and email you if there are updates - apticron.)

Isn't it:

  apt-get dist-upgrade
???

The difference between 'dist-upgrade' and 'upgrade' is that 'dist-upgrade' will install new dependencies (additional methods) if necessary, while 'upgrade' holds back new versions of packages that add new dependencies.

Between point releases, there really shouldn't be new dependencies. Maybe if some library is found to be totally broken from a security point of view it is replaced by another, but that happens very rarely.

So usually, the two commands do exactly the same thing for point release upgrades.

Not between point releases.

As others have mentioned:

    $ sudo apt-get update && sudo apt-get upgrade
In this particular case, from 7.1 to 7.3, "dist-upgrade" is not needed (you aren't upgrading from one distribution to another (e.g. from 6 to 7)).

Well, sometimes you need to dist-upgrade, even when not switching distros.

How would you know when?

Some packages will be held back by apt-get until you "dist-upgrade" them and apt-get will notify you of the held back packages when you apt get "upgrade".

If you get a lot of packages that it tries to uninstall. That's basically what dist-upgrade does: tries to uninstall the least number of packages to allow the update through.

It never happens with a point release though - they are careful about that.

dist-upgrade does not mean distribution upgrade, it just handles additional dependencies after an upgrade and it may remove some packages if necessary.

This is not Ubuntu.

Better use 'aptitude':

  sudo aptitude update && aptitude full-upgrade

Huh? I've been using apt-get on Debian since it was first released (in 1998).

Why is it better to use aptitude on debian?

I've been using debian for years and always just used apt-get.

For a start, aptitudes command line options are less confusing and more powerful.

Furthermore:

http://superuser.com/questions/93437/aptitude-vs-apt-get-whi...

There doesn't seem to be anything that jumps out as a reason to use aptitude over apt-get there. It mentions that the defaults for upgrading the distro are better for aptitude but doesn't say why or what differences there are.

I can see the search being useful though.

Seeing as my muscle memory is set at apt-get, i'll stick with it for the moment.

There was a brief time when aptitude was smarter than apt-get (it was smart enough to remove auto-installed dependencies when you removed a package, for example). During that time, the advice was to use aptitude instead of apt-get.

Those smarts were later moved to apt itself, but it's still a part of the folklore.

There isn't any specific reason, really. It's a matter of preference, and they can be used interchangeably (which wasn't always the case) nowadays.

If you're already on a 7.x install (codename 'wheezy') then per http://www.debian.org/News/2013/20131214 it suffices to enable the updates repository (which I believe is the default) and run `apt-get upgrade`.

The release notes you linked to are for the original 7.0 release. I think that most people will pretty much ignore that there's a point release and continue to update their systems regularly -- unless you're installing a large number of systems or have particular requirements there seems little point in paying it specific attention.

The release notes you linked to are for the original 7.0 release.

The notes I linked are the ones linked from the post page on where the upgrade instructions can be found.

Upgrading from any Debian 7 upgrade should just be:

apt-get update && apt-get upgrade && apt-get dist-upgrade

You don't need that upgrade. The only difference between upgrade and dist-upgrade is that dist-upgrade can add and remove packages, while upgrade will decline to make any upgrades that would require this. As such, dist-upgrade is almost always the one you meant.

In my experience, there's value in doing a standard upgrade before a dist-upgrade. It seems to help to fully update the system doing "upgrade" before "doing the upgrade" (dist-upgrade) that will uninstall things... That said, it can obviously be a bit of a waste to upgrade everything like gnome just to uninstall it immediately... As such, I typically manually uninstall large tasks then upgrade then dist-upgrade and manually add the tasks back. In "theory" it should just be as you say - one big dist-upgrade - but I've yet to encounter an upgrade that didn't need special attention and I have learned that minimizing the installed base being upgraded is a good first step to a smooth transition.

Any time this happens it is a bug. I hope that you reported them. I've never had this kind of issue with Debian stable (other Debian derivatives may be less reliable, and if you're running sid you're expected to fix it yourself).

Is all of this relevant to Debian based systems like Ubuntu as well?

Yes.

To clarify: dist-upgrade upgrades everything, including installing or removing new dependencies. Upgrade upgrades the installed packages, but doesn't add or remove new packages. In theory only using "upgrade" is supposed to be safer (eg more unlikely to break something) but I have not encountered any problems when using dist-upgrade (disclaimer: when you rely on the standard distro repositories; if you use unstable programs/repos or 3rd party repos/PPAs in Ubuntu, it is more likely that dist-upgrade breaks something).

But I do not agree with what ksdkkdddd said. There is not really a use to do upgrade and then dist-upgrade right after it, because upgrade doesn't magically fix something in case dist-upgrade breaks something. It works or it does not. Also if you use apt from the terminal (as you should) and not rely on graphical updaters you always get output on what may prevent upgrading and how to resolve it.

In my experience a package's ability to cope with a complex uninstall scenario generally improves with the initial upgrade - or any upgrade for that matter - (for example, sometimes dist-upgrade-specific issues are only discovered by the maintainer as part of the coordination for a release) and so (in my experience) the reliability of the "dist-upgrade" is usually increased by doing an "upgrade" first. Dist-upgrade is one of those things that "should work" of it's own accord, but there are ways of increasing the odds; I have found a pre-"dist-upgrade" upgrade is one. (Sometimes I'm impatient and only upgrade apt/aptitude before a dist-upgrade though.)

I would say it makes more of a difference on systems that are infrequently upgraded in general since a few points away from the current versions aren't going to contain many differences anyways, but I'd certainly be more hesitant to dist-upgrade from a .0 release (6.0 to 7.x, for example). I'd almost rather clean-install in that scenario since it amounts to a similarly-sized download.

Just doing apt-get update && apt-get upgrade && apt-get dist-upgrade should be enough. You have to be careful, do backups and all that, but that's basically all you need to do.

You don't actually have to do anything if you are already on Wheezy. Just update normally.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.