Announcement

Collapse
No announcement yet.

Annoying behaviour of "apt-get upgrade"

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

    Annoying behaviour of "apt-get upgrade"

    Why is it that when I run "apt-get upgrade" on specific packages, it will try to upgrade all the available packages?

    Code:
    $ sudo apt-get upgrade compiz-core
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following packages will be upgraded:
     compiz-core compiz-kde compiz-plugins libdecoration0 libldap-2.4-2
     libpoppler-glib2 libpoppler-qt2 libpoppler2 linux-headers-2.6.24-19
     linux-headers-2.6.24-19-generic linux-image-2.6.24-19-generic
     linux-kernel-devel linux-libc-dev linux-ubuntu-modules-2.6.24-19-generic
     poppler-utils
    15 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    Need to get 34.1MB of archives.
    After this operation, 0B of additional disk space will be used.
    Do you want to continue [Y/n]?
    I checked the dependency using Adept. As far as I can see, compiz-core is not dependent on any of the kernel packages that are available, yet apt-get forces me to upgrade everything. What gives?
    Registered Linux User: #281828 | Kubuntu User: #22280

    Kubuntu 18.04 LTS
    Dell Precision Workstation T5500 (Xeon @ 2.13GHz x 2 / 12 GB RAM)

    #2
    Re: Annoying behaviour of "apt-get upgrade"

    Code:
    man apt-get
    says

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

    Comment


      #3
      Re: Annoying behaviour of "apt-get upgrade"

      Originally posted by dibl
      Code:
      man apt-get
      says

      " 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."
      Thanks for the info. I guess it was a wrong expectation on my side. That begs the next question... how can I selectlvely upgrade packages via apt-get? I should probably read the man page first, but if you know the answer off the top of your head, I would appreciate your sharing it with me.

      Dai
      Registered Linux User: #281828 | Kubuntu User: #22280

      Kubuntu 18.04 LTS
      Dell Precision Workstation T5500 (Xeon @ 2.13GHz x 2 / 12 GB RAM)

      Comment


        #4
        Re: Annoying behaviour of "apt-get upgrade"

        Hmmmm -- I think you just exceeded my expertise!

        I usually do
        Code:
        sudo apt-get update
        and then accept all of them, on the theory that dpkg will manage the dependencies, and I might as well update everything while I'm doing it.

        The difference between the Debian "update" and "upgrade" is kind of subtle and technical -- I would advise you to study up on it, since it appears to be important for your situation.

        Comment


          #5
          Re: Annoying behaviour of "apt-get upgrade"

          Don't you do "sudo apt-get install packagename" ?

          Comment


            #6
            Re: Annoying behaviour of "apt-get upgrade"

            That doesn't work on an already installed package.
            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
              Re: Annoying behaviour of "apt-get upgrade"

              Originally posted by dibl
              Hmmmm -- I think you just exceeded my expertise!

              I usually do
              Code:
              sudo apt-get update
              and then accept all of them, on the theory that dpkg will manage the dependencies, and I might as well update everything while I'm doing it.

              The difference between the Debian "update" and "upgrade" is kind of subtle and technical -- I would advise you to study up on it, since it appears to be important for your situation.
              I usually update everything, too, except for the kernel. I try to avoid updating the kernel unless security fixes are included in the new version.

              Updating individual packages is very easy on yum-based distributions such as RHEL and Fedora. All you have to do is run "sudo yum update <package_name>," and yum will automatically update the specified packages solving the dependencies. I am hoping it is similarly easy on debian-based systems. I'll read up on apt-get and dpkg a bit more.
              Registered Linux User: #281828 | Kubuntu User: #22280

              Kubuntu 18.04 LTS
              Dell Precision Workstation T5500 (Xeon @ 2.13GHz x 2 / 12 GB RAM)

              Comment


                #8
                Re: Annoying behaviour of &quot;apt-get upgrade&quot;

                Well, you can upgrade the kernel but still boot into the old one, so no danger to your system here. Simply change your /boot/grub/menu.lst

                Below you see the top part of any /boot/grub/menu.lst - simply change the default value (at the bottom) to whichever kernel you want to boot - they are listed at the bottom of the file.

                # menu.lst - See: grub(8), info grub, update-grub(8)
                # grub-install(8), grub-floppy(8),
                # grub-md5-crypt, /usr/share/doc/grub
                # and /usr/share/doc/grub-doc/.

                ## default num
                # Set the default entry to the entry number NUM. Numbering starts from 0, and
                # the entry number 0 is the default if the command is not used.
                #
                # You can specify 'saved' instead of a number. In this case, the default entry
                # is the entry saved with the command 'savedefault'.
                # WARNING: If you are using dmraid do not use 'savedefault' or your
                # array will desync and will not let you boot your system.
                default 0
                Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

                Comment


                  #9
                  Re: Annoying behaviour of &quot;apt-get upgrade&quot;

                  Originally posted by daihard
                  Updating individual packages is very easy on yum-based distributions such as RHEL and Fedora. All you have to do is run "sudo yum update <package_name>," and yum will automatically update the specified packages solving the dependencies. I am hoping it is similarly easy on debian-based systems. I'll read up on apt-get and dpkg a bit more.
                  I've found 'wajig' a rather intuitive front-end for apt-get and dpkg commands.
                  Here's a list of what it can do (bolded where appropiate):
                  All JIG commands:

                  addcdrom Add a CD-ROM to the list of available sources of packages
                  auto-alts Mark the alternative to be auto set (using set priorities)
                  auto-clean Remove superseded .deb files from the download cache
                  auto-download Do an update followed by a download of all updated packages
                  auto-install Perform an install without asking questions (non-interactive)
                  auto-remove Remove packages installed automatically as dependencies
                  available List versions of packages available for installation
                  bug Check reported bugs in package using the Debian Bug Tracker
                  build Retrieve/unpack sources and build .deb for the named packages
                  build-depend Retrieve packages required to build listed packages
                  changelog Retrieve latest changelog for the package
                  clean Remove all deb files from the download cache
                  commands List all the JIG commands and one line descriptions for each
                  contents List the contents of a package file
                  daily-upgrade Perform an update then a dist-upgrade
                  dependents List of packages which depend/recommend/suggest the package
                  describe One line description of packages (-v and -vv for more detail)
                  describe-new One line description of new packages
                  detail Provide a detailed description of package (describe -vv)
                  detail-new Provide a detailed description of new packages (describe -vv)
                  dist-upgrade Upgrade to new distribution (installed and new rqd packages)
                  docs Equivalent to help with -verbose=2
                  download Download package files ready for an install
                  file-download Download packages listed in file ready for an install
                  file-install Install packages listed in a file
                  file-remove Remove packages listed in a file
                  find-file Search for a file within installed packages
                  find-pkg Search for an unofficial Debian package at apt-get.org
                  fix-configure Perform dpkg --configure -a (to fix interrupted configure)
                  fix-install Perform apt-get -f install (to fix broken dependencies)
                  fix-missing Perform apt-get --fix-missing upgrade
                  force Install packages and ignore file overwrites and depends
                  help Print documentation (detail depends on --verbose)
                  hold Place listed packages on hold so they are not upgraded
                  init Initialise or reset the JIG archive files
                  info List the information contained in a package file
                  install Install (or upgrade) one or more packages or .deb files
                  installr Install package and associated recommended packages
                  installrs Install package and recommended and suggested packages
                  installs Install package and associated suggested packages
                  install/dist Install packages from specified distribution
                  integrity Check the integrity of installed packages (through checksums)
                  large List size of all large (>10MB) installed packages
                  last-update Identify when an update was last performed
                  list List the status and description of installed packages
                  list-all List a one line description of given or all packages
                  list-alts List the objects that can have alternatives configured
                  list-cache List the contents of the download cache
                  list-commands List all the JIG commands and one line descriptions for each
                  list-daemons List the daemons that JIG can start/stop/restart
                  list-files List the files that are supplied by the named package
                  list-hold List those packages on hold
                  list-installed List packages (with optional argument substring) installed
                  list-log List the contents of the install/remove log file (filtered)
                  list-names List all known packages or those containing supplied string
                  list-orphans List libraries not required by any installed package
                  list-scripts List the control scripts of the package of deb file
                  list-section List packages that belong to a specific section
                  list-sections List the sections that are available
                  list-status Same as list but only prints first two columns, not truncated
                  list-wide Same as list but avoids truncating package names
                  local-dist-upgrade Dist-upgrade using packages already downloaded
                  local-upgrade Upgrade using packages already downloaded, but not any others
                  locate Search for a file within installed packages
                  madison Runs the madison command of apt-cache.
                  move Move packages in the download cache to a local Debian mirror
                  new List packages that became available since last update
                  news Obtain the latest news about the package
                  new-upgrades List packages newly available for upgrading
                  non-free List installed packages that do not meet the DFSG
                  orphans List libraries not required by any installed package
                  package Generate a .deb file for an installed package
                  policy From preferences file show priorities/policy (available)
                  purge Remove one or more packages and configuration files
                  purge-depend Purge package and those it depend on and not required by others
                  purge-orphans Purge orphaned libraries (not required by installed packages)
                  readme Display the package's README file from /usr/share/doc
                  recursive Download package and any packages it depends on
                  recommended Install package and associated recommended packages
                  reconfigure Reconfigure the named installed packages or run gkdebconf
                  reinstall Reinstall each of the named packages
                  reload Reload daemon configs, e.g., gdm, apache (see list-daemons)
                  remove Remove one or more packages (see also purge)
                  remove-depend Remove package and its dependees not required by others
                  remove-orphans Remove orphaned libraries (not required by installed packages)
                  repackage Generate a .deb file for an installed package
                  reset Initialise or reset the JIG archive files
                  restart Stop then start a daemon, e.g., gdm, apache (see list-daemons)
                  rpm2deb Convert a RedHat .rpm file to a Debian .deb file
                  rpminstall Install a RedHat .rpm package
                  rpmtodeb Convert a RedHat .rpm file to a Debian .deb file
                  search Search for packages containing listed words
                  search-apt Find local Debian archives suitable for sources.list
                  setup Configure the sources.list file which locates Debian archives
                  show Provide a detailed description of package [same as detail]
                  showdistupgrade Trace the steps that a dist-upgrade would perform
                  showinstall Trace the steps that an install would perform
                  showremove Trace the steps that a remove would perform
                  showupgrade Trace the steps that an upgrade would perform
                  size Print out the size (in K) of all, or listed, installed packages
                  sizes Print out the size (in K) of all, or listed, installed packages
                  snapshot Generates list of package=version for all installed packages
                  source Retrieve and unpack sources for the named packages
                  start Start a daemon, e.g., gdm, apache (see list-daemons)
                  status Show the version and available version of packages
                  status-match Show the version and available version of matching packages
                  status-search Show the version and available version of matching packages
                  stop Stop a daemon, e.g., gdm, apache (see list-daemons)
                  suggested Install package and associated suggested packages
                  tasksel Run the Gnome task selector to install groups of packages
                  toupgrade List packages with newer versions available for upgrading
                  unhold Remove listed packages from hold so they are again upgraded
                  unofficial Search for an unofficial Debian package at apt-get.org
                  update Update the list of downloadable packages
                  update-alts Update default alternative for things like x-window-manager
                  update-pci-ids Updates the local list of PCI ids from the internet master list
                  update-usb-ids Updates the local list of USB ids from the internet master list
                  upgrade Upgrade all of the installed packages or just those listed
                  verify Check the md5sums of a package.
                  version Show the current version of wajig.
                  versions List version and distribution of (all) packages.
                  whatis A synonym for describe
                  whichpkg Find the package that supplies the given command or file

                  Command line options:

                  -h|--help Print usage message.
                  -q|--quiet Do system commands everything quietly.
                  -n|--noauth Allow packages from unathenticated archives.
                  -s|--simulate Trace but don't execute the sequence of underlying commands.
                  -t|--teaching Trace the sequence of commands performed.
                  -v|--verbose=n Increase (or set) the level of verbosity (to n).
                  -y|--yes Assume yes for any questions asked.

                  Fuller documentation can be found at http://www.togaware.com/wajig.
                  Also, wajig will ask for your password when needed so you don't have to 'sudo' the commands.
                  If you want wajig, install package 'wajig'.

                  Comment


                    #10
                    Re: Annoying behaviour of &quot;apt-get upgrade&quot;

                    Originally posted by kubicle
                    Originally posted by daihard
                    Updating individual packages is very easy on yum-based distributions such as RHEL and Fedora. All you have to do is run "sudo yum update <package_name>," and yum will automatically update the specified packages solving the dependencies. I am hoping it is similarly easy on debian-based systems. I'll read up on apt-get and dpkg a bit more.
                    I've found 'wajig' a rather intuitive front-end for apt-get and dpkg commands.
                    Here's a list of what it can do (bolded where appropiate):
                    ...
                    Also, wajig will ask for your password when needed so you don't have to 'sudo' the commands.
                    If you want wajig, install package 'wajig'.
                    Thanks for the useful information! I will give wajig a try.
                    Registered Linux User: #281828 | Kubuntu User: #22280

                    Kubuntu 18.04 LTS
                    Dell Precision Workstation T5500 (Xeon @ 2.13GHz x 2 / 12 GB RAM)

                    Comment

                    Working...
                    X