Here's the best advice for LMDE users

Post your update and upgrade related errors here
Forum rules
Before you post please read this

Here's the best advice for LMDE users

Postby squeezy on Wed Sep 19, 2012 10:07 am

Forget you ever heard of the apt-get upgrade command.

That is all. :D
squeezy
Level 5
Level 5
 
Posts: 567
Joined: Thu Feb 23, 2012 2:05 pm
Location: The Land of Enchantment

Linux Mint is funded by ads and donations.
 

Re: Here's the best advice for LMDE users

Postby Monsta on Wed Sep 19, 2012 10:20 am

Amen. :D

And as zerozero said...
1- it's documented in the wounds and scars we got in the early days of lmde :D
2- it's also documented in the systems that crashed and burned because of it :D
3- it's finally documented in the fact that not one rolling release has or recommend any form of partial upgrade (and although lmde can't technical be called a rolling release, these UP updates act like it)
Monsta
Level 8
Level 8
 
Posts: 2463
Joined: Fri Aug 19, 2011 3:46 am

Re: Here's the best advice for LMDE users

Postby zerozero on Wed Sep 19, 2012 10:24 am

:D moved here. it seems a better place for this topic
Image

[ bliss of ignorance ]
zerozero
Level 16
Level 16
 
Posts: 6485
Joined: Tue Jul 07, 2009 2:29 pm

Re: Here's the best advice for LMDE users

Postby at2marty on Wed Sep 19, 2012 7:29 pm

squeezy wrote:Forget you ever heard of the apt-get upgrade command.

That is all. :D


OK, so educate us. What should I use rather than apt-get upgrade? Also, can you give a pointer to documentation that explains this? I ran into a few "hiccups" when doing an update/upgrade. The only thing that "saved" me was my knowledge of using Linux, and being comfortable working on a command line.
at2marty
Level 1
Level 1
 
Posts: 7
Joined: Tue Sep 18, 2012 6:06 pm

Re: Here's the best advice for LMDE users

Postby jlsmith722 on Wed Sep 19, 2012 7:56 pm

Now I am seriously confused.
i have been using a script that sequentially runs:
    apt-get update
    apt-get upgrade
    apt-get dist-upgrade
For some reason I thought that this was the correct approach. If this is the wrong way I would like to understand why?
:?: :?
Jim
[size=85]Being intelligent is not a felony. But most societies evaluate it as at least a misdemeanor.
Robert Heinlein
User avatar
jlsmith722
Level 1
Level 1
 
Posts: 48
Joined: Fri Mar 05, 2010 9:38 am

Re: Here's the best advice for LMDE users

Postby squeezy on Thu Sep 20, 2012 12:33 am

Read the documentation on apt-get.

The upgrade command only updates packages that will require no new packages to be installed or cause any packages to be removed. This can lead to dependency issues and broken packages. Can be very problematic if you reboot after this.

dist-upgrade, the command you should use, will update everything, pull in any new dependencies required and can remove packages that conflict with the updates.

Skip the apt-get upgrade step and just do apt-get dist-upgrade.

mintupdate-debian (Update Manager) performs a dist-upgrade, that ought to give you a hint.
squeezy
Level 5
Level 5
 
Posts: 567
Joined: Thu Feb 23, 2012 2:05 pm
Location: The Land of Enchantment

Re: Here's the best advice for LMDE users

Postby zerozero on Thu Sep 20, 2012 11:17 am

man apt-get
DESCRIPTION
apt-get is the command-line tool for handling packages, and may be considered the user's "back-end" to other tools using the APT library. Several
"front-end" interfaces exist, such as dselect(1), aptitude(8), synaptic(8) and wajig(1).

Unless the -h, or --help option is given, one of the commands below must be present.

update
update is used to resynchronize the package index files from their sources. The indexes of available packages are fetched from the location(s) specified
in /etc/apt/sources.list. For example, when using a Debian archive, this command retrieves and scans the Packages.gz files, so that information about
new and updated packages is available. An update should always be performed before an upgrade or dist-upgrade. Please be aware that the overall progress
meter will be incorrect as the size of the package files cannot be known in advance.

upgrade
upgrade is used to install the newest versions of all packages currently installed on the system from the sources enumerated in /etc/apt/sources.list.
Packages currently installed with new versions available are retrieved and upgraded; under no circumstances are currently installed packages removed, or
packages not already installed retrieved and installed. New versions of currently installed packages that cannot be upgraded without changing the
install status of another package will be left at their current version
. An update must be performed first so that apt-get knows that new versions of
packages are available.

dist-upgrade
dist-upgrade in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages; apt-get
has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary.

The dist-upgrade command may therefore remove some packages. The /etc/apt/sources.list file contains a list of locations from which to retrieve desired
package files. See also apt_preferences(5) for a mechanism for overriding the general settings for individual packages.



there's a common misunderstanding that dist-upgrade will pull us to the next release; first of all apt can't change the sources.list and automatically move us from squeeze to wheezy or from wheezy to jessie. this doesn't happen; dist-upgrade does exactly what the man pages says;

maybe the naming is confusing :? aptitude got it better
update
Updates the list of available packages from the apt sources (this is equivalent to “apt-get update”)

safe-upgrade
Upgrades installed packages to their most recent version. Installed packages will not be removed unless they are unused (see the section “Managing
Automatically Installed Packages” in the aptitude reference manual). Packages which are not currently installed may be installed to resolve dependencies
unless the --no-new-installs command-line option is supplied.

If no <package>s are listed on the command line, aptitude will attempt to upgrade every package that can be upgraded. Otherwise, aptitude will attempt
to upgrade only the packages which it is instructed to upgrade. The <package>s can be extended with suffixes in the same manner as arguments to aptitude
install, so you can also give additional instructions to aptitude here; for instance, aptitude safe-upgrade bash dash- will attempt to upgrade the bash
package and remove the dash package.

It is sometimes necessary to remove one package in order to upgrade another; this command is not able to upgrade packages in such situations. Use the
full-upgrade command to upgrade as many packages as possible.

full-upgrade
Upgrades installed packages to their most recent version, removing or installing packages as necessary. This command is less conservative than
safe-upgrade and thus more likely to perform unwanted actions. However, it is capable of upgrading packages that safe-upgrade cannot upgrade.

If no <package>s are listed on the command line, aptitude will attempt to upgrade every package that can be upgraded. Otherwise, aptitude will attempt
to upgrade only the packages which it is instructed to upgrade. The <package>s can be extended with suffixes in the same manner as arguments to aptitude
install, so you can also give additional instructions to aptitude here; for instance, aptitude full-upgrade bash dash- will attempt to upgrade the bash
package and remove the dash package.

Note
This command was originally named dist-upgrade for historical reasons, and aptitude still recognizes dist-upgrade as a synonym for full-upgrade.


another urban myth is apt-get update && apt-get upgrade && apt-get dist-upgrade or if you are in mint apt update && apt upgrade && apt dist-upgrade
dist-upgrade already performs the upgrade command; not saying that is wrong the above approach but can in certain circumstances cause dependencies mismatches.
Image

[ bliss of ignorance ]
zerozero
Level 16
Level 16
 
Posts: 6485
Joined: Tue Jul 07, 2009 2:29 pm

Re: Here's the best advice for LMDE users

Postby jlsmith722 on Thu Sep 20, 2012 5:11 pm

Thanks zero-zero for the help and the information.

Jim
[size=85]Being intelligent is not a felony. But most societies evaluate it as at least a misdemeanor.
Robert Heinlein
User avatar
jlsmith722
Level 1
Level 1
 
Posts: 48
Joined: Fri Mar 05, 2010 9:38 am

Re: Here's the best advice for LMDE users

Postby at2marty on Thu Sep 20, 2012 8:30 pm

First and foremost, thank you for the expaination, and "forcing" me to RTFM. :wink:

Here is a thought that I have, and maybe others can chime in on this. Please correct me if I am wrong.

The "underlying" package management tool is dpkg.

apt-get is a tool that I suspect that most users are familiar with, and it does "limited" upgrades to a system depending on what argument is passed to the program. There are two different arguments that can be passed to the command, those being "upgrade" and "dist-upgrade" (among others, but I'm trying to keep this discussion to updates/upgrades).

The command "aptitude" does the same thing, only the arguments are different. You can give it "update", "safe-upgrade" or "full-upgrade", yet it supposedly does the same thing that apt-get does.

I don't understand why there are two tools available to do the same command and the same action. This tends to confuse an "end user" like me. Why not make one or the other "the way" to do something?
at2marty
Level 1
Level 1
 
Posts: 7
Joined: Tue Sep 18, 2012 6:06 pm

Re: Here's the best advice for LMDE users

Postby zerozero on Fri Sep 21, 2012 12:04 pm

at2marty wrote: Why not make one or the other "the way" to do something?

choice :D some like apt, some like aptitude, some time ago i was playing with wajig (has nice features and a KISS approach)

more read the fine manual 8) http://www.debian.org/doc/manuals/debia ... ls.en.html
Image

[ bliss of ignorance ]
zerozero
Level 16
Level 16
 
Posts: 6485
Joined: Tue Jul 07, 2009 2:29 pm

Re: Here's the best advice for LMDE users

Postby zerozero on Tue Sep 25, 2012 1:59 pm

Gene :wink: remembered that I had some time written a few lines on this subject (also with a distinction between the upgrade process in main mint and lmde)
here it is >> apt-get upgrade vs. apt-get dist-upgrade
Image

[ bliss of ignorance ]
zerozero
Level 16
Level 16
 
Posts: 6485
Joined: Tue Jul 07, 2009 2:29 pm

Re: Here's the best advice for LMDE users

Postby DrHu on Tue Sep 25, 2012 2:10 pm

at2marty wrote:I don't understand why there are two tools available to do the same command and the same action. This tends to confuse an "end user" like me. Why not make one or the other "the way" to do something?

Linux is not a platform per see, unlike Microsoft or Apple + Intel or compatibles (AMD), and therefor doesn't have a single point of control for their hardware set (Apple) or software mainly (Microsoft)..

Because the one-way method is not possible in the open source world, and from a UNIX base the general principal has been to combine the tools (utilities) available by default on the OS in order to make a more encompassing tool: the basis of scripting you system
--don't think either Microsoft nor Apple have ignored this, the both understand that scripting tools/languages allow often better control and customization of their systems, even if they actively promote the desktop GUI tools in the main..
http://msdn.microsoft.com/en-us/library ... ll(v=vs.85).aspx
https://en.wikipedia.org/wiki/Automator_(software)
    They both control the GUI and desktop either via batch like commands for point&click or complete programmatic control of the system..
User avatar
DrHu
Level 16
Level 16
 
Posts: 6836
Joined: Wed Jun 17, 2009 8:20 pm

Linux Mint is funded by ads and donations.
 

Return to Update/Upgrade Issues

Who is online

Users browsing this forum: No registered users and 11 guests