LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 01-28-2013, 07:25 PM   #1
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Rep: Reputation: 47
Commands to keep system updated and clean


I am using Debian Testing with following in the sources.list:
Code:
deb http://ftp.debian.org/debian/ testing main contrib non-free
deb http://security.debian.org testing/updates main contrib non-free
deb http://ftp.debian.org/debian/ testing-proposed-updates main contrib non-free
I am using following commands regularly to keep my system updated and clean.
Code:
apt-get update
apt-get dist-upgrade
apt-get -f check
apt-get autoremove
apt-get autoclean
Are they all right and what should be the correct order for using them? Is there any duplicacy/repetition in above commands? There is a command 'wajig purgeorphans'. What is the apt-get equivalent of this command and should I use it regularly? Thanks for your help.
 
Old 01-28-2013, 08:08 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,307
Blog Entries: 28

Rep: Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136
I use a similar sequence, except that I replace "dist-upgrade" with just "upgrade."

The only time I've used "dist-upgrade" was to go from Lenny to Squeeze. The apt-get man file has a good, clear description of the difference between the two. Maybe I've been wrong to do so, and if so, someone will tell us.
 
Old 01-28-2013, 08:28 PM   #3
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
I don't usually go from update to dist-upgrade preferring to just use upgrade first so I can keep an eye on things better.

autoremove is a somewhat dangerous command in anything but the stable release. You could possibly remove something that you really should have kept.

-f check is pretty much for diagnostic purposes and I don't see much sense in running it unless you can't figure out what a missing depends is.

autoclean is nice to run once in a while. There could be times when you really want to back up a ways in your testing install because of breakage and you could conceivably want a package that is no longer easy to download. Whould not think that is likely to happen but you may want to concider that. My installs are large enough to be able to just keep the packages stored in /var/cache/apt/archive. You should check the size of it on occasion though just to see if it is getting out of hand.

I would just stick with;
Code:
apt-get update
apt-get upgrade
apt-get dist-upgrade
I would also HIGHLY recommend installing the package "apt-listbugs" which will tell you about KNOWN bugs in a package you are installing or upgrading.

You should probably do a little reading on dpkg.

Remember that Debian testing is soon, apon the release of Wheezy as the new stable, to "upgrade" to Jessie. Right now we are in prerelease freeze for fixing bugs. Things will get more interesting when we leave freeze.

I was not, for instance, paying attention when Squeeze was released. My sources.list also reads "testing". The day Squeeze went stable I groggily run my update and woke up quickly when upgrade listed well over 1000 packages and a few hundred held back. That all went well as do most of the regular update/upgrade cycles that have MUCH smaller numbers of packages.

Those do, however, many time have many more upgraded packages every day than we are getting now. It really is nice to know how many of them are buggy coming into your system.

You will find many people that think Sid is safer to run than testing. I do not agree completely with that. I use testing most of the time. Sid gets fixed quicker though if something does break.

I have a testing and a Sid install sharing a /home partition so that I can switch from one to the other as conditions indicate.

If you are new to Debian and used some other distro that was based on Debian in the past you should know that Wheezy is more stable now than some are several months after release. What you may not know is that Jessie will be a long way from release and testing can be quite unstable at times.

I have another pair of installs that are set up more securely that I use for business online. They also share a /home partition. Right now, it is Squeeze and (the one I am on right now) Wheezy. It is good to have a stable install somewhere on your box incase Debian testing and/or Sid become unusable to you.

You will find that knowing something about dpkg and apt-get tools will come in quite handy for keeping them going.

Not in the least trying to discourage you in using testing. Just think you should know that this is about as stable as most distros get right now. Testing is not always this stable.

Some care is called for when running update/upgrade cycles.
 
Old 01-28-2013, 09:12 PM   #4
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Original Poster
Rep: Reputation: 47
Thanks for your comments and explanations.

I took the sequence apt-get update and then dist-upgrade from "wajig dailyupgrade" command which uses the same sequence.

According to the man page info, apt-get -f check: here the -f option leads to fixing the broken packages and is not just for diagnostic purpose.

I want a (1)rolling-release and (2)stable distro so that I may not need to reinstall the system every few months. Using "testing" seems to be both rolling release and likely to be more stable than sid, hence this configuration. I understand from your explanation that I have to be careful once the freeze period is over. Is there any better alternative?

Any need of "wajig purge-orphans" or "wajig fix-install"?

Last edited by rng; 01-28-2013 at 09:15 PM.
 
Old 01-28-2013, 09:37 PM   #5
Randicus Draco Albus
Senior Member
 
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,711
Blog Entries: 8

Rep: Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635
I do not use Testing, but in two years on the Debian forum, I have never seen reference to wajig purge-orphans and wajig fix-install. I have also neither seen them in the basic user guide for APT nor here at LQ. So are they important? My guess is no, but I am only guessing.

Quote:
I want a (1)rolling-release and (2)stable distro
You desire mutually opposing goals.
 
1 members found this post helpful.
Old 01-28-2013, 10:01 PM   #6
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
I concur with the last speaker. If you want a reasonably stable rolling release, try the latest Mint release. Still Debian based, but the flavouring needs some "acquired taste" I've heard it's good, very good even, but personally I prefer stable over fancy
 
Old 01-28-2013, 11:40 PM   #7
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Original Poster
Rep: Reputation: 47
"apt-cache search wajig" command output is:
Code:
wajig - simple and unified package management for Debian
I found it very useful when I started with Debian as it obviates need for apt-get, apt-cache, dpkg, deselect etc.
http://www.linuxquestions.org/questi...an-4175439743/
The command "wajig commands" will show all commands options available there and it seems very comprehensive. But I am using here apt-get etc since they are more commonly used.

Regarding LMDE (linux mint debian edition) seems a good option but if I can setup Debian-testing only, I would prefer that.
 
Old 01-29-2013, 05:14 PM   #8
Randicus Draco Albus
Senior Member
 
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,711
Blog Entries: 8

Rep: Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635
After reading the thread you linked to, I can say you answered your own question.
Quote:
I only want to know why this program is not more frequently recommended (as compared to dpkg or apt-get)?
Quote:
It obviates the need for using different commands like apt-get, apt-cache, dpkg, deselect, aptitude etc.
Most Debian users prefer using those simple commands to using a GUI or anything else that makes the process more complicated. That explains why wajig is so uncommonly used. It is meant to "simplify" administration by providing a tool that has simultaneous links to several different processes. It is not surprising most Debian users eschew it. [Considering how many long-time Debianites despise Synaptic. (I would add a laughing icon, but this board does not have one.)]
 
Old 01-29-2013, 05:21 PM   #9
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
I use simply:

Code:
apt-get update
apt-get dist-upgrade
and have never had any problems.

You may wish to edit your sources.list to "wheezy" instead of "testing" so that your install will transition to Stable at some point in the next few months; then you will have attained one of your two mutually exclusive goals (the more important one, in my opinion).
 
Old 01-30-2013, 12:30 PM   #10
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
Wajig scares the crap out of me just reading about it.

There is no need to reinstall every few months with Debian anyway. Squeeze was released in February of 2011. Will be supported for a year after Wheezy is released as stable.

At this point in development Wheezy is pretty stable. If you were to use "wheezy" instead of "testing" you would simply go on with the new stable release when Wheezy is released.

This would give you a chance to use a good, solid and up to date system for quite a while even if you feel a need for the newest versions of packages. This would give you time to learn to use the base package management system in Debian which is already one of the most simple and reliable around.

It is very rare, unless the user has been doing some rather strange things, for there to be depends problems under Debian.

You would be better off to use Synaptic than wajig. It is a gui front end for apt-get and works very well most of the time. It has enough sense to direct you to dpkg on occasion though.

These kind of tools that "automate" package systems are fine in their place. Remember that they are designed for stable systems. Using them in place of the core package tools in an unstable environment is asking for trouble.

Both apt-get and aptitude were developed to simplify package management so that you don't need to use dpkg all the time for simple things like update/upgrade cycles. Every time you add another layer on to a system you are geometricly increasing the possibility of error.

I am perfectly capable, indeed very good at, making my own mistakes. I have serious doubts about any tool that offers to make decissions for me based on what the tools developer figures is the condition of my system. Assumptions made by the tool may not be even close to reality. In that case each step it takes is complicating recovery.

When you throw something like that into an inherently unstable system it becomes nothing more than a bomb waiting to go off.

I think you could, given very little space on your box, that a Debian Testing system running with wajig, compared to an identical system not running wajig will have many more problems over the length of the testing cycle. A couple of very basic 10 to 15 gig installs run side by side with identical packages installed would show this very clearly I am sure.

Wajig sounds to me very like a command line immitation of Update Manager. Using that in a testing install is just about sure to break the install.

I have, by the way, a couple of installs of Linux Mint Debian Edition on here. I would not want to run it myself as my production OS. It has, however, over several cycles of its package management system proven to be very stable. It runs somewhat behind Debian testing giving a stable snapshot of Debian Testing in regular large "Update Packs". I installed it on my boss' personal laptop sometime last summer and she has, as someone with no knowlege of Linux, had no trouble with it.

It is proving to be a fairly up to date OS that is also stable.
 
Old 01-30-2013, 07:11 PM   #11
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Original Poster
Rep: Reputation: 47
I am not clear on one point: does stable version get new versions of software such as iceweasel browser or libreoffice programs? If yes, then what really is the difference between testing and stable? Only time period of testing? So the latest software would only arrive a little later in stable than in testing?

Also, once wheezy becomes stable, can I change my sources.list to "stable"? Will that work as well? I am looking at putting an OS for years, provided it is updated regularly as well.
 
Old 01-30-2013, 07:35 PM   #12
Randicus Draco Albus
Senior Member
 
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,711
Blog Entries: 8

Rep: Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635
Stable does not receive new software. Only security updates. The packages in Squeeze are now two years old. New packages are added to Testing, until it is frozen before being released as the next Stable. Whatever versions of applications that are currently in Wheezy will be there until Wheezy ceases to exit.
 
Old 01-30-2013, 07:37 PM   #13
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
Quote:
Originally Posted by rng View Post
I am not clear on one point: does stable version get new versions of software such as iceweasel browser or libreoffice programs?
No it does not. However, a "backports" repository exists to provide certain updated applications to Stable users:

http://backports-master.debian.org/

Quote:
Originally Posted by rng View Post
Also, once wheezy becomes stable, can I change my sources.list to "stable"? Will that work as well? I am looking at putting an OS for years, provided it is updated regularly as well.
Sure, you could do that, in which case you will have Wheezy, then Jessie when it becomes Stable in a few years, and then whatever is the next Stable after that. The release upgrades would have to be done carefully (following the Release Notes) but you would theoretically have a very reliable system for many years to come (probably longer than the useful lifespan of your hardware due to Moore's Law).
 
Old 01-30-2013, 08:15 PM   #14
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Original Poster
Rep: Reputation: 47
If applications are not being updated then stable version is not what I am trying to find.
 
Old 01-30-2013, 08:32 PM   #15
Randicus Draco Albus
Senior Member
 
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,711
Blog Entries: 8

Rep: Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635
That is why stable systems are stable. The packages are added after the bugs have been worked out. Systems that add new packages before the bugs are worked out tend to be unstable. The newer the software, the greater the chances of instability. If you feel software that is a year or more old is too old, your search will lead you to a system with shiny new packages, bugs and all. You must decide which is more important to you: stability or freshness out of the bag.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to keep the system clean? mmtt22 Linux Mint 13 01-04-2012 04:01 PM
How to clean up the system lomnhom Fedora 1 04-17-2007 09:20 AM
system clean up ? lomnhom Linux - Software 2 04-17-2007 06:09 AM
help -- updated kernel -- lost commands nomb Fedora 3 08-12-2006 09:15 PM
How do you keep your system clean? darkleaf Debian 8 10-12-2004 04:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 03:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration