Learn and Understand APT. Avoid Confusion

Forum Forums General Tips and Tricks Learn and Understand APT. Avoid Confusion

  • This topic has 3 replies, 4 voices, and was last updated Dec 3-5:28 pm by Brian Masinick.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #125070
    Member
    Xunzi_23

      Some basic commands and flags plus a number of very useful links.

      Should you find a reproducable bug in APT which is not already listed for your debian version in
      https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=apt;dist=unstable (replace tag unstable as neccesary)
      Please report it:
      https://www.debian.org/Bugs/Reporting

      Option
      Description
      -d, –download-only
      Downloads a package but does not continue with the installation.
      –no-download
      Does not download any packages and uses the ones already downloaded.
      –assume-no
      Answers “no” to all prompts.
      -y
      Answers “yes” to prompts without interrupting the process.
      -f, –fix-broken
      Tries to fix broken dependencies.
      -s, –simulate
      Does not alter the system, only displays what the output will be.
      -h, –help
      Prints a help guide and leads to an Easter Egg.

      Command
      Description
      update
      Gets the info about the latest versions of available packages but does not install any upgrades.
      upgrade
      Downloads the up-to-date package versions and upgrades installed packages to the new version.
      full-upgrade
      Upgrades the currently installed packages and removes packages not needed for the full system upgrade.
      install
      Installs a specified package from the repository.
      remove
      Deletes a package but leaves configuration files.
      purge
      Deletes a package and any configuration files.
      autoremove
      Removes no longer required dependencies.
      list
      Lists all available packages or packages according to specific criteria.
      search
      Searches for packages whose name or description contains the search term.
      show
      Prints details about a specific package.
      edit-sources
      Allows users to edit package sources in a text editor.

      For reasonably easy to understand and fairly complete in depth articles on apt, Advanced Package Tool usage options and commands
      Please Visit

      https://phoenixnap.com/kb/apt-linux
      https://phoenixnap.com/kb/how-to-use-apt-get-commands

      #125086
      Member
      stevesr0

        Nice.

        I would give a + but that is not available for an opening post.

        #125098
        Member
        anti-apXos

          Thanks, Xunzi_23. I always use commandline apt, but I admit there’s a lot I don’t understand about how it works.

          One thing that’s always confused me and that your post finally motivated me to look up is why ‘apt install’ sometimes asks for confirmation before downloading and installing and other times doesn’t.

          I thought maybe it had to do with the size of the install, but actually it’s whether there are any dependencies that weren’t explicitly listed in the commandline. If there aren’t additional depends, installation proceeds without a prompt.

          I like being able to see the download and install size before installing, but apparently there’s no way to override this behavior so that you always get a prompt. However, the ‘–print-uris’ commandline option works similar to ‘–simulate’, but also gives the size info, so it can be used.

          Source: https://www.linuxquestions.org/questions/linux-general-1/apt-get-install-does-not-ask-for-confirmation-859586/

          #125101
          Moderator
          Brian Masinick

            @xunzi_23

            Thanks again for additional documentation regarding apt; it’s an excellent addition to your recent explanations and deep dive into the apt source code.

            Very useful information for both novices and veterans; I have found value in both of your recent group of posts.

            --
            Brian Masinick

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.