Announcement

Collapse
No announcement yet.

Updating the system using Discover vs command line..

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [System] Updating the system using Discover vs command line..

    I update my Kubuntu using the following commands:

    Code:
    sudo apt update
    sudo apt upgrade
    sudo apt dist-upgrade
    sudo apt autoremove --purge
    sudo apt clean
    When updating using Discover, does it do the exact same steps ? if not, what exactly does discover do ?

    EDIT: Where is discover's source code?(the part that runs commands to update the system?) ?
    Last edited by Modularity; Nov 04, 2020, 07:27 PM.

    #2
    Originally posted by Modularity View Post
    I update my Kubuntu using the following commands:

    Code:
    sudo apt update
    sudo apt upgrade
    sudo apt dist-upgrade
    sudo apt autoremove --purge
    sudo apt clean
    These have redundant commands.
    Skip apt upgrade, and just use apt full-upgrade (replacing the old dist-upgrade switch).

    Discover runs apt update and apt full-upgrade under the hood. All other commands are useful, not necessary to run with every update, and completely optional.


    Source code consists of text files that are used to compile a program, if you want to see what Discover , via Packagekit, is doing under the hood, just run the commands pkcon refresh and pkcon upgrade. Packagekit is a tool that works on different types of distros (debs, rpms, etc) by using different backends to provide a common GUI no matter what type of system one has.

    If you have updates available, you will note that packagekit (via pkcon command) will look very similar to apt, as in our case it is using apt to do the work under the surface.

    Discover also handles updating Snap and Flatpaks, if any are installed. Apt does not handle either of those. Neither does the pkcon commands.

    Comment


      #3
      I have been using apt upgrade instead of apt full-upgrade...and now I am starting to use apt full-upgrade...Is this ok or did I mess something up by using apt upgrade ?

      Comment


        #4
        Originally posted by claydoh View Post
        Discover also handles updating Snap and Flatpaks, if any are installed. Apt does not handle either of those. Neither does the pkcon commands.
        Also nice is that Discover now updates anything installed from the KDE Store (AKA KDE's section of Opendesktop.org). This includes themes, wallpapers, widgets, icon packs, etc. I really dig this feature.
        ​"Keep it between the ditches"
        K*Digest Blog
        K*Digest on Twitter

        Comment


          #5
          Originally posted by Modularity View Post
          I have been using apt upgrade instead of apt full-upgrade...and now I am starting to use apt full-upgrade...Is this ok or did I mess something up by using apt upgrade ?
          From the manpage for apt:

          upgrade (apt-get(8))
          upgrade is used to install available upgrades of all packages currently installed on
          the system from the sources configured via sources.list(5). New packages will be
          installed if required to satisfy dependencies, but existing packages will never be
          removed
          . If an upgrade for a package requires the removal of an installed package the
          upgrade for this package isn't performed.


          full-upgrade (apt-get(8))
          full-upgrade performs the function of upgrade but will remove currently installed
          packages if this is needed to upgrade the system as a whole.
          What eventually happens, is that due to not removing some things, you end up NOT getting all updates, and then a mix of old and new bits that can cause some things to stop working, or general breakages.
          If a new version or update of a thing requires NewFooBar3, and the previous version used OldFooBar2, the new thing won't be installed if FooBar3 replaces OldFooBar2 as OldFooBar2 won't be uninstalled using apt upgrade

          This does not of course happen with every update, but it definitely does occur with Plasma version upgrades, particularly major version bumps. But it can happen elsewhere as well. Ubuntu based distros are packaged a little differently from how Debian does it, where the apt upgrade is the correct method there. Using the previous apt dist-upgrade, and now apt full-upgrade have always been the correct apt usage in *buntu type systems.

          Comment


            #6
            Is there a way to figure out which packages do not get updated as a result of using apt upgrade ? are kernels also affected ?

            Comment


              #7
              As I say, skip apt upgrade altogether. It saves nothing, provides nothing, and the system is designed to use full-upgrade.
              Ignore it altogether.

              I say this from 15 years of updating *buntu based systems.

              I am not aware of any command that will show a difference in what is installed or not using one string over the other.

              Just use full-upgrade, same as Discover uses. It is simpler and you get all the updates.


              Kernels don't require something to be removed at all so unaffected

              Comment

              Working...
              X