Announcement

Collapse
No announcement yet.

Need a lesson in package managers

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

    Need a lesson in package managers

    I just upgraded to Jammy (22.04). I'm really happy with it, btw, thanks to all who suggested that I do so. I waited until the installation was complete before installing updates. I like to use Konsole to do the updates, but I always run Discover to change the software sources and select the best server. The first time I did this, I got an error when entering my password. So I used Konsole. Fortunately, Discover gave me the sudo command to use. Can't recall it now, and didn't save it.

    When the updates were finished in Konsole. I refreshed Discover, and there were still updates. I re-ran the
    Code:
    sudo apt-get update
    and
    Code:
    sudo apt-get upgrade
    again in Konsole, and the same packages in Discover weren't installed. I had to revert to Discover to finish installing the remaining packages. I don't understand why.

    In other posts I have here, Muon has been mentioned. What's the difference between Muon and Discover?

    These are related to other questions I'm asking about installing a VPN server, and I don't understand how everything is connected. Why would Muon have any greater benefit for installing packages to support a VPN server than Discover?

    #2
    Use sudo apt full-upgrade instead.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      I usually do it with one command since I'm lazy! 🤣

      Code:
      sudo apt update && sudo apt full-upgrade
      Constant change is here to stay!

      Comment


        #4
        Just to add to the confusion I most of the time install synaptic and use it for most of my package management. I'm just use to it.
        Code:
        sudo apt install synaptic
        Dave Kubuntu 20.04 Registered Linux User #462608

        Wireless Script: http://ubuntuforums.org/showthread.p...5#post12350385

        Comment


          #5
          Originally posted by gshockxcc View Post
          […]
          In other posts I have here, Muon has been mentioned. What's the difference between Muon and Discover?[…]
          One obvious difference between Discover and Muon (and Synaptic) is that Discover also can update your Snaps and Flatpaks and the other two can't.

          Both Muon and Synaptic have been written as a graphical frontend for APT, whereas Discover uses packagekit, iIrc, and can also be used in combination with other CLI package managers like dnf, zypper or pacman - also with Flatpaks and Snaps.
          Don't throw stones at me, but I would say Muon roughly is equal to Synaptic, but it is written based on Qt instead of GTK.
          Last edited by Schwarzer Kater; Feb 13, 2023, 10:15 AM. Reason: typos
          Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
          Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

          get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
          install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

          Comment


            #6
            Discover is a Software Store while Muon and Synaptic are Package Managers. Think of Discover as being an auto dealership where you can only browse their selection of ready to drive vehicles, while Muon and Synaptic also have parts and pieces.
            Windows no longer obstructs my view.
            Using Kubuntu Linux since March 23, 2007.
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

            Comment


              #7
              Originally posted by Snowhog View Post
              Discover is a Software Store while Muon and Synaptic are Package Managers. Think of Discover as being an auto dealership where you can only browse their selection of ready to drive vehicles, while Muon and Synaptic also have parts and pieces.
              ^^^^^^^^^^^^^^^^^^^^
              This is perfect. A 'package manager' is quite literal here. Handling actual packages.
              Packages do not necessarily involve desktop software applications at all in most cases. Kernels, drivers, system libraries, system services, , your desktop environment, and all your command line programs are installed/managed as packages, as well as your desktop applications

              Plasma's Discover focus specifically on GUI desktop applications and appearance items, mainly, plus installing system updates. Gnome Software does the same sort of thing as well on other desktops.
              This is what most people need, much of the time.

              Apt, and its gui front-ends are for more advanced usage needs and wants. Mainly, for most people it is much more informational. You see exactly what is being updated, down to the last individual component. This sounds like overkill, but it really isn't.

              Originally posted by gshockxcc View Post
              When the updates were finished in Konsole. I refreshed Discover, and there were still updates
              Now, since Linux has this need to be confusing, and add confusions on top of that, the issue here is that there are different types of application packages nowadays. Apt only handles the native Ubuntu/Debian .deb packages.
              But now Ubuntu have their new-ish self-contained Snap packages, and there is also another called Flatpak
              These are NOT handled by apt whatsoever.
              What you are seeing are very likely applications using the Snap format, since this is what Ubuntu uses and promotes.
              snap refresh can be used on the command line for this.
              At the very least, Firefox comes installed as a Snap in Ubuntu now. You should see a label for the type of package an application is, if it is only available via the Snap store, or as a choice if it happens to be available via both native packages as well as snaps/flatpacks

              Click image for larger version  Name:	Screenshot_20230212_090642.png Views:	0 Size:	105.4 KB ID:	668475 Click image for larger version  Name:	Screenshot_20230212_090421.png Views:	0 Size:	185.0 KB ID:	668476



              Also, if you have installed any KDE theme or widget related items, these can show in Discover as well. These are not managed by apt, either, and have no command line method of updating currently.
              Last edited by claydoh; Feb 12, 2023, 08:20 AM.

              Comment


                #8
                Originally posted by claydoh View Post

                ^^^^^^^^^^^^^^^^^^^^
                This is perfect. A 'package manager' is quite literal here. Handling actual packages.
                Packages do not necessarily involve desktop software applications at all in most cases. Kernels, drivers, system libraries, system services, , your desktop environment, and all your command line programs are installed/managed as packages, as well as your desktop applications
                claydoh, great explanation. Thank you. For me, for right now, you're absolutely spot on, I don't need much more than visibility to see what's being updated or installed. The main focus for me is to learn from what Linux is doing and understand why.

                For example, I ran
                Code:
                apt list --upgradable
                this morning, and I got this list:
                python3-software-properties/jammy-updates,jammy-updates 0.99.22.5 all [upgradable from: 0.99.22.2]
                software-properties-common/jammy-updates,jammy-updates 0.99.22.5 all [upgradable from: 0.99.22.2]
                software-properties-qt/jammy-updates,jammy-updates 0.99.22.5 all [upgradable from: 0.99.22.2]
                ubuntu-advantage-tools/jammy-updates 27.13.3~22.04.1 amd64 [upgradable from: 27.9~22.04.1]
                Using Snowhog's recommendation, I ran
                Code:
                sudo apt full-upgrade
                , which returned the following:
                Code:
                The following packages have been kept back:
                 python3-software-properties software-properties-common software-properties-qt ubuntu-advantage-tools
                0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
                ​
                This is not an attempt to hijack my own thread. I just don't understand why some packages are installed and some aren't.

                Comment


                  #9
                  Originally posted by gshockxcc View Post
                  I just don't understand why some packages are installed and some aren't.
                  Staged updates. A ‘new’ schema on how and when packages are to be updated and made available for users. It’s the ‘new normal’.
                  Windows no longer obstructs my view.
                  Using Kubuntu Linux since March 23, 2007.
                  "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                  Comment


                    #10
                    Originally posted by Snowhog View Post
                    Staged updates. A ‘new’ schema on how and when packages are to be updated and made available for users. It’s the ‘new normal’.
                    Originally posted by claydoh View Post
                    Linux has this need to be confusing, and add confusions on top of that,
                    And oddly, it is stodgy Debian that created this schema.
                    I think Ubuntu makes more obvious use of it, though. And of course you only notice the staged updates if you update on the command line. Use the updater, and you never know, since there is nothing actually wrong.

                    TMI Time:
                    https://ubuntu.com/server/docs/about...phased-updates
                    https://askubuntu.com/questions/1431...buntu-use-them
                    https://people.canonical.com/~ubuntu...d-updates.html

                    Comment


                      #11
                      Originally posted by Snowhog View Post
                      Staged updates. A ‘new’ schema on how and when packages are to be updated and made available for users. It’s the ‘new normal’.
                      AKA "phased updates".

                      Adding to confusion is that many of the tools have not been updated to be "phased update" aware. For example apt list --upgradable will list held back packages. To get the proper picture one can use the clumsy apt full-upgrade --dry-run.
                      Regards, John Little

                      Comment


                        #12
                        Originally posted by jlittle View Post
                        AKA "phased updates".
                        Doh!



                        But again, they could be staged.
                        Windows no longer obstructs my view.
                        Using Kubuntu Linux since March 23, 2007.
                        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                        Comment


                          #13
                          Originally posted by jlittle View Post
                          Adding to confusion is that many of the tools have not been updated to be "phased update" aware
                          I missed adding that bit. And sort of strange that they didn't add something for this.
                          I imagine it will come sooner or later.

                          But held back packages are not necessarily being phased. Janky PPAs and general repo shenanigans by the user on top of distro package bugs all can lead to this.

                          The only sure fire way is to use apt policy on one of the packages:

                          Code:
                          $ apt policy grub-efi-amd64-bin
                          grub-efi-amd64-bin:
                            Installed: 2.06-2ubuntu10
                            Candidate: 2.06-2ubuntu14
                            Version table:
                               2.06-2ubuntu14 500 (phased 47%)
                                  500 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
                           *** 2.06-2ubuntu10 500
                                  500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
                                  100 /var/lib/dpkg/status
                               2.06-2ubuntu7 500
                                  500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
                          ​

                          And straying further off-topic (who, me?)
                          While Apt is Debian of course, the feature may be more of an Ubuntu focused one. It IS part of apt now, but Debian itself seems to have no docs about it or mentions, and change logs are somewhat vague. Ubuntu has had some form of 'phased' updates since at least 2013-ish iirc, and much of the direct built-in functionality we are seeing is pretty recent.

                          Of course, if thei IS an Ubuntu job, we kinda know how this might go........

                          Comment


                            #14
                            A bit off topic, but another tip concerning (for example) upgrading your system:

                            If you like to use the CLI (and bash) you might want to create a file named ".bash_aliases" within your $HOME directory (for example with Kate - it is invisible due to the "." at the beginning) with a content like:
                            Code:
                            # apt
                            alias upda='sudo apt update && apt list --upgradable'
                            alias fuup='sudo apt full-upgrade'​
                            
                            # flatpak
                            alias flup='flatpak update'
                            
                            # snap
                            alias snup='sudo snap refresh'​​
                            
                            # update everything
                            alias upall='sudo apt update && sudo apt full-upgrade && flatpak update && sudo snap refresh'
                            Do a source .bashrc afterwards and you can type upda instead of sudo apt update && apt list --upgradable in the future.
                            Those are just examples - you can choose nearly any combination of characters you like between "alias " and "='command(s)_that_shall_be_executed'" (good to avoid commands that already exist as an alias name, though).

                            "The sky is the limit", but check that you don't have duplicate entries in the files ".bashrc" and ".bash_aliases" otherwise the result can be not what you intended.

                            PS: see alias --help for further explanation.
                            Last edited by Schwarzer Kater; Feb 13, 2023, 10:13 AM. Reason: typos & additional example for .bash_aliases
                            Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                            Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                            get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                            install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                            Comment

                            Working...
                            X