• @[email protected]
    link
    fedilink
    English
    82 months 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…

  • @[email protected]
    link
    fedilink
    1632 months 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.

      • @[email protected]
        link
        fedilink
        32 months ago

        Lol. You’re not alone. I’ve thought that for the longest time ever. Until one I had the question pop into my head and started searching it.

    • Captain Aggravated
      link
      fedilink
      English
      22 months ago

      If I recall correctly, Linux Mint did their own thing for a bit with the apt command so there were two different implementations out there for awhile?

      • @[email protected]
        link
        fedilink
        22 months ago

        I don’t know if they modified apt at all. I know they have their mint tools that call apt through some python code, like mintinstall = apt install <package> for the software manager and mintupgrade = apt upgrade for updating mint versions … Etc

  • @[email protected]
    link
    fedilink
    172 months ago

    How my brain distinguishes them:

    apt-get when you want full verbose output

    apt when you want to feel fancy with progress bars and colours

    • @[email protected]
      link
      fedilink
      72 months ago

      apt install nano (simple, clean)

      apt-get install nano (works too, but more detailed output)

      Apt-get give more technical output , helps in scripting .

  • @[email protected]
    link
    fedilink
    12 months ago

    It’s been a long time since I’ve needed to use either. Instead I typically use Synaptic Package Manager, Mint’s Software Manager, or gdebi. Guess I’m just a filthy casual.

  • Maki
    link
    fedilink
    322 months ago

    Wait until you learn of aptitude…

  • Rose
    link
    fedilink
    42 months ago

    Me, I’m old, so I just keep using apt-get, because that’s all we had back in the day, and I never bothered to learn what’s the big deal about apt. It’s just a frontend, isn’t it?

    • JackbyDev
      link
      fedilink
      English
      32 months ago

      Apt looks a little prettier I think. But I may be wrong.

  • @[email protected]
    link
    fedilink
    English
    202 months ago

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

  • @[email protected]
    link
    fedilink
    172 months ago

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

  • @[email protected]
    link
    fedilink
    3602 months 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
    • @[email protected]
      link
      fedilink
      1312 months 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!

  • Ananace
    link
    fedilink
    382 months ago

    One has super cow powers, the other one doesn’t.

  • @[email protected]
    link
    fedilink
    English
    50
    edit-2
    2 months 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.

    • @[email protected]
      link
      fedilink
      English
      52 months 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.

    • DasFaultier
      link
      fedilink
      42 months ago

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

      Same goes for nala, BTW.

    • @[email protected]
      link
      fedilink
      26
      edit-2
      2 months 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.

  • @[email protected]
    link
    fedilink
    293
    edit-2
    2 months 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.

          • Unbecredible
            link
            fedilink
            English
            3
            edit-2
            2 months ago

            Descheduling is a natural part of life, buddy. All us scripts are written into existence and our hearts set beating to the cadence of great Cron’s ever-ticking quartz clock. Until Cron takes us off his schedule and our memory is freed once again.

            Back to the silicon.

            • Joe Abercrombie

            The question, O me! so sad, recurring—What good amid these, O me, O life?

            Answer.

            That you are here—that life exists and identity,

            That the powerful OS goes on, and you may contribute a process.

            That the powerful OS goes on, and you may contribute a process.

            • Walt Whitman
    • nelson
      link
      fedilink
      772 months 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 ).

      • @[email protected]
        link
        fedilink
        9
        edit-2
        2 months 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 :)

        • @[email protected]
          link
          fedilink
          3
          edit-2
          2 months ago

          @[email protected]

          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

          Usually installing a manually downloaded package and its dependencies works like this:
          # dpkg -i package-file.deb
          # apt-get -f install

          So apt-get can be used to install missing dependencies afterwards while marking them as automatically installed.

            • @[email protected]
              link
              fedilink
              12 months ago

              Sure, but as I understood, the question was how to do that “properly” with dpkg and apt-get, i.e. without the ‘new’ apt script.

      • @[email protected]
        link
        fedilink
        382 months 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

        • Maki
          link
          fedilink
          42 months ago

          And here I am using gdebi for those kinds of local packages…

        • Fushuan [he/him]
          link
          fedilink
          22 months 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?

          • @[email protected]
            link
            fedilink
            English
            122 months 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.

            • Fushuan [he/him]
              link
              fedilink
              42 months ago

              I didn’t know, thanks! I guess in hindsight I meant “official” as in, it’s not just some rando, I can trust it won’t break, and I don’t have to manually download the stuff every time xD

              • @[email protected]
                link
                fedilink
                English
                52 months ago

                Yep! All those things are true, but it’s due to the hard work of the archlinux team and not discord doing anything valuable. The debian/ubuntu/etc team could probably repackage the tar.xz or include the deb file in their official repos if they wanted. They just don’t. And given how simple the workaround is, i don’t really blame them. Debian isn’t going to ship something that will require constant updating to work with remote servers, and ubuntu probably just wants you to use a snap anyway.

                The archlinux team is just pretty cool.

          • @[email protected]
            link
            fedilink
            12 months 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.

            • Fushuan [he/him]
              link
              fedilink
              82 months ago

              Updating itself isn’t really the Linux way of things. The Linux way is to have a centralised place like pacman or apt and to download everything at once. Every app having their own download and update system sounds like a nightmare.

              • @[email protected]
                link
                fedilink
                12 months ago

                The nightmare in question is windows. My point was that since their client isn’t distributed by a mechanism with automatic updates, they could at least have made it work, but no.