Announcement

Collapse
No announcement yet.

apt vs apt-get

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

    #16
    Yeah, I use apt-get for autoremove (alias "aremove").

    Re. the -y switch, I wasn't thinking about your actual request - I wrongly assumed you wanted no prompt, when you're asking for no output. I can't say for apt (haven't tested) but for apt-get, you can use -qq for error output only or -q for no output at all.

    Since you're using an alias anyway - no reason not to use apt-get with the -qq switch if it doesn't work with apt. The only benefit to using apt in this instance is color output, which you want to suppress anyway. So your new alias should be:

    sudo apt update; sudo apt list --upgradable; sudo apt-get -qq dist-upgrade

    Please Read Me

    Comment


      #17
      Originally posted by oshunluvr View Post
      Yeah, I use apt-get for autoremove (alias "aremove").

      Re. the -y switch, I wasn't thinking about your actual request - I wrongly assumed you wanted no prompt, when you're asking for no output. I can't say for apt (haven't tested) but for apt-get, you can use -qq for error output only or -q for no output at all.

      Since you're using an alias anyway - no reason not to use apt-get with the -qq switch if it doesn't work with apt. The only benefit to using apt in this instance is color output, which you want to suppress anyway. So your new alias should be:

      sudo apt update; sudo apt list --upgradable; sudo apt-get -qq dist-upgrade
      I found that using the -qq switch removed the prompt. This is what happens as described in the man for apt-get
      -q, --quiet
      Quiet; produces output suitable for logging, omitting progress indicators. More q's will produce more quiet up to a maximum of 2. You can also use
      -q=# to set the quiet level, overriding the configuration file. Note that quiet level 2 implies -y; you should never use -qq without a no-action
      modifier such as -d, --print-uris or -s as APT may decide to do something you did not expect. Configuration Item: quiet.
      By using a single -q, I still get the install packages listed.

      It is nice to get the apt green listing of packages to be installed, but I find it unnecessary to have this repeated by either apt or apt-get. So I will remove the apt list --upgradable and just have either the apt or apt-get commands to do the upgrade.

      To test this out, I need updates which, unfortunately are rare with Wily, but mountainous with Xenial and a dribble with Vivid. Will let you know what I decide. Basically I do not need to be told twice what packages are going to be installed.

      Comment


        #18
        After testing the apt options on Xenial, I have decided to just use:
        Code:
        sudo apt update; sudo apt full-upgrade
        I am surprised that in the development of the apt full-upgrade code, the listing of the packages by this command doesn't use the same code used in the apt list --upgradable command for listing the installed packages.

        I guess that one day "the penny will drop" and the developers will add this feature.
        Last edited by NoWorries; Dec 03, 2015, 02:21 AM.

        Comment

        Working...
        X