Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Want To Keep Debian 9.0 Up-to-date

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
tb75252
Posts: 61
Joined: 2010-10-09 00:27

Want To Keep Debian 9.0 Up-to-date

#1 Post by tb75252 »

I am using Debian 9.0, 64-bit.
I would like to keep Debian up-to-date with the most recent stable packages. I did searches on the Internet and have then made changes/added entries as follows in /etc/apt/sources.list:
# deb cdrom:[Debian GNU/Linux 9.0.0 _Stretch_ - Official amd64 DVD Binary-1 20170617-13:08]/ stretch main

#deb cdrom:[Debian GNU/Linux 9.0.0 _Stretch_ - Official amd64 DVD Binary-1 20170617-13:08]/ stretch main

#deb http://ftp.us.debian.org/debian/ stretch main
deb http://ftp.us.debian.org/debian/ stable main contrib non-free
#deb-src http://ftp.us.debian.org/debian/ stretch main
deb-src http://ftp.us.debian.org/debian/ stable main contrib non-free

#deb http://security.debian.org/debian-security stretch/updates main
deb http://security.debian.org/debian-security stable main contrib non-free
#deb-src http://security.debian.org/debian-security stretch/updates main
deb-src http://security.debian.org/debian-security stable main contrib non-free

# stretch-updates, previously known as 'volatile'
#deb http://ftp.us.debian.org/debian/ stretch-updates main
deb http://ftp.us.debian.org/debian/ stable-updates main contrib non-free
#deb-src http://ftp.us.debian.org/debian/ stretch-updates main
deb-src http://ftp.us.debian.org/debian/ stable-updates main contrib non-free
Can I safely run

Code: Select all

sudo apt upgrade
?

User avatar
4D696B65
Site admin
Site admin
Posts: 2696
Joined: 2009-06-28 06:09
Been thanked: 85 times

Re: Want To Keep Debian 9.0 Up-to-date

#2 Post by 4D696B65 »

tb75252 wrote: Can I safely run

Code: Select all

sudo apt upgrade
?
Yes but you should always update the package database first with

Code: Select all

sudo apt update

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Want To Keep Debian 9.0 Up-to-date

#3 Post by dasein »

The only thing better than getting someone else to answer this for you is for you to learn to answer it for yourself.

Repo management may be strange and unfamiliar to you, but it is not hard.

The Wiki has an entire page devoted to answering this question: https://wiki.debian.org/SourcesList

tb75252
Posts: 61
Joined: 2010-10-09 00:27

Re: Want To Keep Debian 9.0 Up-to-date

#4 Post by tb75252 »

dasein wrote:The only thing better than getting someone else to answer this for you is for you to learn to answer it for yourself.

Repo management may be strange and unfamiliar to you, but it is not hard.

The Wiki has an entire page devoted to answering this question: https://wiki.debian.org/SourcesList
I read that page but I don't see any mention of this:
# stretch-updates, previously known as 'volatile'
#deb http://ftp.us.debian.org/debian/ stretch-updates main
deb http://ftp.us.debian.org/debian/ stable-updates main contrib non-free
#deb-src http://ftp.us.debian.org/debian/ stretch-updates main
deb-src http://ftp.us.debian.org/debian/ stable-updates main contrib non-free
Does it mean that it is not needed?

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Want To Keep Debian 9.0 Up-to-date

#5 Post by dasein »

tb75252 wrote:I read that page but..
Then I suggest that you read it again. A thorough understanding of that page will allow you to see an inconsistency in your sources that will potentially bite you in the butt in the distant future.
tb75252 wrote:I don't see any mention of this...
And what other Wiki pages did you look at? (I'm not trying to be a hard-ass, but I'll repeat my earlier point: repo management isn't hard, and after 7 years, it's something you should have mastered for yourself long ago. Moreover, the Wiki answers every question you've asked in this thread.)
tb75252 wrote:Does it mean that it is not needed?
Strictly speaking, no, it's not needed, though some folks find it useful. (The Wiki has more details :mrgreen:).

Wheelerof4te
Posts: 1454
Joined: 2015-08-30 20:14

Re: Want To Keep Debian 9.0 Up-to-date

#6 Post by Wheelerof4te »

Oh, for God's sake. Just rename everything to Stretch. Keeping it at stable will cause problems when the next Debian stable release comes out.
Also, you can remove or disable deb-scr repos if you don't plan on using source packages. That will make your sources.list easier to read, too.
I am using Debian 9.0, 64-bit.
Debian is at 9.1 now, so you should upgrade after renaming everything to Stretch and running

Code: Select all

apt-get update

User avatar
Lysander
Posts: 643
Joined: 2017-02-23 10:07
Location: London
Been thanked: 1 time

Re: Want To Keep Debian 9.0 Up-to-date

#7 Post by Lysander »

As a hint I would say you wouldn't need a good three quarters of that sources.list.

User avatar
Ardouos
Posts: 1075
Joined: 2013-11-03 00:30
Location: Elicoor II
Has thanked: 1 time
Been thanked: 4 times

Re: Want To Keep Debian 9.0 Up-to-date

#8 Post by Ardouos »

All of your questions are answered with Daseins post, so there is no real need to elaborate on it. I agree that learning the fundamentals of repo management is a good way for your stable system to live a smoother, happier life.

In regards to your current sources that you have posted. I would ask yourself "Do I want to be following Stretch/9 for its lifespan? Or do I want to upgrade to the next stable as soon as it is released". A question that you have already answered in your thread title. Therefore if you have read the wiki link provided, you should know what to remove and what to allow.
There is only one Debian | Do not break Debian | Stability and Debian | Backports

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

ruffwoof
Posts: 298
Joined: 2016-08-20 21:00

Re: Want To Keep Debian 9.0 Up-to-date

#9 Post by ruffwoof »

My /etc/apt/source.list contains just

deb http://httpredir.debian.org/debian jessie main
deb http://security.debian.org/ jessie/updates main

and I run

apt-get update
apt-get upgrade

periodically and it has and continues to work well for me. My plan is to upgrade to Stretch once that shifts to being oldstable i.e. use a sources.list with stretch instead of jessie. If you use 'stable' then it will upgrade as soon as a new 'stable' comes out. Bear in mind however that 'stable' in Debian terms means unchanging (changed as little as possible) ... and not stable as in solid. New releases of stable can be liquid as wider usage identifies bugs that the developers missed across all 50,000 or whatever programs in the Debian repositories. By the time a release enters oldstable ... its pretty solid, and that continues to receive security updates. Such stability comes at the cost of running older (extensively tested) versions of programs; Or that the version might be too old for your (newer) hardware.

Note I don't use contrib or nonfree as it works for me without those (including my Nvidia card).

tb75252
Posts: 61
Joined: 2010-10-09 00:27

Re: Want To Keep Debian 9.0 Up-to-date

#10 Post by tb75252 »

One question. You say:
Keeping it at stable will cause problems when the next Debian stable release comes out.
But then at the end of your message you state:
When in doubt, choose Debian Stable
Is this not contradictory?

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Want To Keep Debian 9.0 Up-to-date

#11 Post by dasein »

tb75252 wrote:Is this not contradictory?
No.

Go read the damn Wiki already!

[rant]For everyone who feels the need to spoonfeed well-documented answers every time someone asks a really basic question, this is what happens when you do. However well-intentioned your motives might be, you end up creating an artificially dependent invalid who can't tell a code name from a release name, or otherwise wipe his own butt, despite having used Debian for nearly eight years.[/rant]

Image

MALsPa
Posts: 678
Joined: 2007-12-07 19:20
Location: albuquerque
Been thanked: 2 times

Re: Want To Keep Debian 9.0 Up-to-date

#12 Post by MALsPa »

tb75252 wrote:One question. You say:
Keeping it at stable will cause problems when the next Debian stable release comes out.
But then at the end of your message you state:
When in doubt, choose Debian Stable
Is this not contradictory?
No, don't look at it that way. "stretch" and "stable" in sources.list basically give you the same packages right now, I think. But they won't contain the same stuff when the next Stable comes out. So just be consistent and go with one name -- "stretch" or "stable" -- throughout your sources.list file.

Definitely take time to do as much searching and reading online as possible -- then you won't have to ask many questions here (and, I guess, everybody will be happy). Just about any question you have has already been asked, or can be answered via the wiki, man pages, and/or web searches.

Post Reply