Announcement

Collapse
No announcement yet.

apt vs apt-get

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

    apt vs apt-get

    apt vs apt-get

    A decent discussion (for Debian) with examples and clarification:
    http://www.howtogeek.com/234583/simp...Speed=noscript
    Special note on Mint's new scripts. Informative comments re the documentation of all this.

    Maybe it's a case of what you are used to, but I feel that the apt-get's are easier to understand, maybe more "low-level." I see many people here using just the apt commands as highlighted in the article.
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    #2
    I prefer the newer apt, and IMO it is better for those new to doing APT stuff from the CLI; but there's not much difference.

    Yes, apt-get is slightly lower "level", but in bringing out the new command, a few niceties have been added:
    1. sudo apt update tells you when it's finished whether or not there's packages that are upgradeable (landed in vivid)
    2. sudo apt full-upgrade rather than the misleadingly named sudo apt-get dist-upgrade... BTW, missing from the howtogeek post
    3. sudo apt full-upgrade has slightly more colourful progress indication
    Regards, John Little

    Comment


      #3
      jlittle: sudo apt full-upgrade rather than the misleadingly named sudo apt-get dist-upgrade... BTW, missing from the howtogeek post
      Ah ... Thanks, jlittle.
      An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

      Comment


        #4
        Looks like I won't need all those aliases I created to simplify anymore

        Comment


          #5
          Ha! The work has been done, huh?
          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

          Comment


            #6
            Naw, aliases are still good to have - I have one called upd8, which does an update and a full-upgrade. I be lazee

            Comment


              #7
              Originally posted by claydoh View Post
              Naw, aliases are still good to have - I have one called upd8, which does an update and a full-upgrade. I be lazee
              True. use them to skip typing. e.g. install='sudo apt-get install'
              guess I could just remove the -get

              Comment


                #8
                Originally posted by vsreeser View Post
                True. use them to skip typing. e.g. install='sudo apt-get install'
                guess I could just remove the -get
                I do the same, except using "install" can get you into trouble as it's a linux command. I use "instal" (single el).

                I use alias update='sudo apt update; sudo apt list --upgradable' for update. The sceond command outputs a list of upgradeable files or states that you are up to date.

                Please Read Me

                Comment


                  #9
                  Originally posted by oshunluvr View Post
                  I do the same, except using "install" can get you into trouble as it's a linux command. I use "instal" (single el).

                  I use alias update='sudo apt update; sudo apt list --upgradable' for update. The sceond command outputs a list of upgradeable files or states that you are up to date.
                  I like the --upgradable Using this could let me know if I really need to do an update right now, or just wait. I'm paranoid. make an image of partition or drive before major updates. Only takes 10 minutes or so. about 10 to restore as well using clonezilla

                  Comment


                    #10
                    While I am carefully calculating saved costs for keyboard replacement as a function of the number of times -getcan be avoided in the future, I would like to say that this is pretty much a hackers' improvement as most everyday package management can be accomplished via graphical frontends these days. Having said that I have still not really started to use that on a routine basis, as I find apt-get quite handy. I mean, it is not much I have to do, only sudo apt-get update and sudo apt-get upgrade on a regular basis, spiced with a few intermittent dist-upgrades.
                    That is all I need to do as long as I stick to using software from the standard kubuntu repositiories because that software is almost always so nicely packaged that nothing more is needed. For which work I am very thankful, I'd like to add! <3
                    All the rest is stuff you only need when you are tempted to meddle with the latest fanciest stuff from development versions in some ppa or even worse, downloaded off the net or something. You probably read on some forum how to do it, and then it got you into trouble so you need more powerful spells to get out of it.
                    So just a word of warning in case any beginners read this: nah, these days you don't have to make life difficult for yourselves as long as you wait a little for those who make life easy for you...that fancy package may be standard in the next version or so.

                    :-)

                    sorry for screwing up with the fonts, still struggling to find the code in "advanced mode" editor here. There is no default font option and I don't recognize any but a few font names
                    Last edited by heinkel_111; Nov 30, 2015, 02:14 PM. Reason: didn't look good!

                    Comment


                      #11
                      I tend to use Konsole and just up-arrow to the line with the apt-get command as that is about the only command that I use with Konsole. On those occasions when I do other commands, it doesn't take long to get to the update line.

                      I must say that I do like the output from the apt command but I always approve the packages for upgrade and there don't use the --upgradable option. What I now use is:
                      Code:
                      sudo apt update; sudo apt dist-upgrade

                      Comment


                        #12
                        The "--upgradeable" option is used with "sudo apt list" and only lists the upgrade-able files. It takes no other action. It's useful if you wish to see what will be upgraded by apt or apt-get prior to running upgrade.

                        Also worth noting: while "dist-upgrade" is not technically listed as an option for apt, it does appear to work. This seems to be undocumented. "full-upgrade" is the correct option for apt as listed by man or help.

                        Please Read Me

                        Comment


                          #13
                          Originally posted by oshunluvr View Post
                          The "--upgradeable" option is used with "sudo apt list" and only lists the upgrade-able files. It takes no other action. It's useful if you wish to see what will be upgraded by apt or apt-get prior to running upgrade.

                          Also worth noting: while "dist-upgrade" is not technically listed as an option for apt, it does appear to work. This seems to be undocumented. "full-upgrade" is the correct option for apt as listed by man or help.
                          Thanks for that, as I now get a progress line which is very handy in the case of Kubuntu 16.04 which this morning had 93 upgrades and 5 new packages. My command line is now:
                          Code:
                          sudo apt update; sudo apt list --upgradable; sudo apt full-upgrade
                          The only visual problem remaining is that the full-upgrade also lists all the packages in the old format before the approval request. I suspect that there is an option which would not show this list. Any suggestions would be greatly appreciated.

                          Comment


                            #14
                            I believe the -y switch will work. Try:

                            ...; sudo apt -y full-upgrade

                            Please Read Me

                            Comment


                              #15
                              Originally posted by oshunluvr View Post
                              I believe the -y switch will work. Try:

                              ...; sudo apt -y full-upgrade
                              When I use the -y switch it still re-lists the packages and then proceeds to do the full-upgrade without approval.

                              As I was running out of systems to test the apt command on, I used a Trusty system which had a new kernel update. I then could not find an autoremove equivalent for apt. I don't think it is viable to do a remove for each package listed

                              Comment

                              Working...
                              X