• DonutsRMeh@lemmy.world
    link
    fedilink
    arrow-up
    91
    arrow-down
    1
    ·
    9 hours ago

    apt is a newer, more user-friendly front-end for apt-get and apt-cache.

    apt = combines commands like install, remove, update, upgrade into one tool, with prettier output

    #apt-get = older, lower-level, more script-friendly For normal use, just use apt now. For scripting where 100% backward compatibility matters, use apt-get.

      • cmhe@lemmy.world
        link
        fedilink
        arrow-up
        8
        ·
        2 hours ago

        Yes, but apt-get is missing search for instance, because that relates to the cache, so apt-cache provides it.

        apt combines all those often used commands, and provides a nicer shell presentation.

  • dan@upvote.au
    link
    fedilink
    arrow-up
    230
    ·
    edit-2
    14 hours ago

    These days, apt is for humans whereas apt-get is for scripts. apt’s output is designed for humans and may change between releases, whereas apt-get is guaranteed to remain consistent to avoid breaking scripts.

    apt combines several commands together. For example, you can use it to install packages from both repos and local files (e.g. apt install ./foo.deb) whereas apt-get is only for packages from repos and you’d need to use dpkg for local packages.

    • nelson@lemmy.world
      link
      fedilink
      arrow-up
      58
      ·
      13 hours ago

      Huh TIL.

      I never considered trying to install a package from a local file through apt, but always dpkg. End result is the same of course. The web suggests dpkg rather than apt as well ( or at least the pages I ended up on ).

      • themoonisacheese@sh.itjust.works
        link
        fedilink
        arrow-up
        26
        ·
        11 hours ago

        Discord is distributed as a .Deb if you don’t use flatpak because they can’t be bothered to set up a repo.

        The very useful thing about local file install is that unlike dpkg, apt will install dependencies automatically

        • Fushuan [he/him]@lemm.ee
          link
          fedilink
          arrow-up
          2
          ·
          10 hours ago

          Thats weird, they do have an arch official package and that’s the one they usually don’t make because AUR is a thing. Have you checked lately?

          • themoonisacheese@sh.itjust.works
            link
            fedilink
            arrow-up
            1
            ·
            2 hours ago

            I have checked on every new update because their fuckass client apparently can’t update itself in big 2025 and instead just opens your browser to the download url because that’ll convince people that Linux is great.

          • bisby@lemmy.world
            link
            fedilink
            English
            arrow-up
            5
            ·
            9 hours ago

            An “official” arch package? The arch package is packaged by the arch maintainers. https://gitlab.archlinux.org/archlinux/packaging/packages/discord

            The maintainers of the PKGBUILD are all arch maintainers, which just downloads the generic .tar.gz file discord provides and puts it in all the places you need for you.

            The “official” arch packages are just PKGBUILDs like the AUR, except prebuilt, managed (and signed) by the arch team.

      • dan@upvote.au
        link
        fedilink
        arrow-up
        7
        ·
        edit-2
        8 hours ago

        apt and apt-get both use dpkg internally, but these days it’s essentially seen as an implementation detail that regular users don’t need to know about.

        dpkg doesn’t resolve dependencies (that’s a feature of apt) which means that if you install a Debian package with dpkg, you’ll have to manually install all dependencies first, and they won’t be marked as automatically installed (so autoremove won’t remove them if they’re not needed any more). Using apt solves that.

        The web suggests dpkg because either the articles are old, or they’re based on outdated knowledge :)

  • truthfultemporarily@feddit.org
    link
    fedilink
    arrow-up
    281
    arrow-down
    3
    ·
    15 hours ago

    The binary is called apt-get. There are others like apt-cache etc.

    Apt is a script that just figures out which binary to use and passes the arguments on.

    • apt update -> apt-get update
    • apt policy -> apt-cache policy
    • grrgyle@slrpnk.net
      link
      fedilink
      arrow-up
      99
      ·
      14 hours ago

      You know, I thought I knew why, but this was new information to me, so I guess I didn’t.

      Thanks for sharing this concise explico!

  • trolololol@lemmy.world
    link
    fedilink
    arrow-up
    10
    arrow-down
    1
    ·
    9 hours ago

    I came in for the jokes but all I found was helpful responses. Did I get the Nazi virus from Reddit?

  • tal@lemmy.today
    link
    fedilink
    English
    arrow-up
    46
    arrow-down
    2
    ·
    edit-2
    15 hours ago

    apt is newer and mostly supersedes apt-get/apt-cache/etc tools, tries to be a more-approachable frontend.

    They interoperate though, so if you’re happy with using a mix of them, go for it. I generally just use apt.

    EDIT: There were also some older attempts to produce a unified frontend, like aptitude.

    • Colloidal@programming.dev
      link
      fedilink
      English
      arrow-up
      4
      ·
      5 hours ago

      Aptitude is great (my favorite way of managing packages), but it’s a TUI program. You can use it as CLI, at which point it mimics apt-get.

      So I would say it never attempted to unify apt commands, by rather it successfully provided a user friendly way to do most (all?) of what you could do with apt CLI tools.

    • dan@upvote.au
      link
      fedilink
      arrow-up
      24
      ·
      edit-2
      14 hours ago

      mostly supersedes apt-get/apt-cache/etc tools,

      Except for in scripts. Debian guarantee that the output format of apt-get will never change and thus it’s safe to use in scripts that parse the output, whereas they don’t have the same guarantee for apt, which can change between releases.

  • four@lemmy.zip
    link
    fedilink
    English
    arrow-up
    18
    ·
    15 hours ago

    When working with RHEL I always flip a coin to see if I’m gonna use yum or dnf this time

    • Victor@lemmy.world
      link
      fedilink
      arrow-up
      28
      ·
      edit-2
      14 hours ago

      Here lie dragons. Make sure you understand commands that you run on your computer. 👍

        • Rhaedas@fedia.io
          link
          fedilink
          arrow-up
          8
          ·
          14 hours ago

          People don’t change. Some people look at what they’re repeating and try to understand the why, others blindly do what they are told by whom they deem as authority. LLMs are the latest, earlier were various websites (which LLMs were trained on, uh oh), still before that were the computer magazines with things to type in and the later versions even maybe a free CD of stuff. The printed media was less likely to have malicious things in them, but lord did they have errors, and the right error in the wrong place could ruin someone’s day if they just ran it without understanding it.

  • Empricorn@feddit.nl
    link
    fedilink
    English
    arrow-up
    8
    ·
    15 hours ago

    I know about these and git and flatpaks and snaps and can definitely explain them all to you! But unfortunately, I just remembered I left my oven on…

  • Matriks404@lemmy.world
    link
    fedilink
    arrow-up
    4
    arrow-down
    2
    ·
    11 hours ago

    Isn’t this explained in the manpages for apt(8) and apt-get(8)?

    Do people don’t read their manuals anymore?