Here's the best advice for LMDE users

Archived topics about LMDE 1 and LMDE 2
Locked
squeezy

Here's the best advice for LMDE users

Post by squeezy »

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

That is all. :D
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Monsta
Level 10
Level 10
Posts: 3071
Joined: Fri Aug 19, 2011 3:46 am

Re: Here's the best advice for LMDE users

Post by Monsta »

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)
zerozero

Re: Here's the best advice for LMDE users

Post by zerozero »

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

Re: Here's the best advice for LMDE users

Post by at2marty »

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.
jlsmith722

Re: Here's the best advice for LMDE users

Post by jlsmith722 »

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
squeezy

Re: Here's the best advice for LMDE users

Post by squeezy »

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.
zerozero

Re: Here's the best advice for LMDE users

Post by zerozero »

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.
jlsmith722

Re: Here's the best advice for LMDE users

Post by jlsmith722 »

Thanks zero-zero for the help and the information.

Jim
at2marty

Re: Here's the best advice for LMDE users

Post by at2marty »

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?
zerozero

Re: Here's the best advice for LMDE users

Post by zerozero »

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
zerozero

Re: Here's the best advice for LMDE users

Post by zerozero »

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
DrHu

Re: Here's the best advice for LMDE users

Post by DrHu »

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 ... s.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..
Locked

Return to “LMDE Archive”