• dan@upvote.au
    link
    fedilink
    arrow-up
    283
    ·
    edit-2
    2 days 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@lemm.ee
            link
            fedilink
            English
            arrow-up
            2
            ·
            edit-2
            20 hours 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@lemmy.world
      link
      fedilink
      arrow-up
      74
      ·
      2 days 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
        35
        ·
        2 days 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
          ·
          2 days 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?

          • bisby@lemmy.world
            link
            fedilink
            English
            arrow-up
            9
            ·
            2 days 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]@lemm.ee
              link
              fedilink
              arrow-up
              3
              ·
              2 days 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

              • bisby@lemmy.world
                link
                fedilink
                English
                arrow-up
                3
                arrow-down
                1
                ·
                1 day 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.

          • themoonisacheese@sh.itjust.works
            link
            fedilink
            arrow-up
            1
            ·
            2 days 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]@lemm.ee
              link
              fedilink
              arrow-up
              7
              ·
              2 days 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.

              • themoonisacheese@sh.itjust.works
                link
                fedilink
                arrow-up
                1
                ·
                15 hours 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.

      • dan@upvote.au
        link
        fedilink
        arrow-up
        10
        ·
        edit-2
        2 days 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 :)

        • Successful_Try543@feddit.org
          link
          fedilink
          arrow-up
          3
          ·
          edit-2
          1 day ago

          @fluckx@lemmy.world

          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.

          • dan@upvote.au
            link
            fedilink
            arrow-up
            5
            ·
            1 day ago

            That works, but why do that when you could just do apt install ./package-file.deb?

            • Successful_Try543@feddit.org
              link
              fedilink
              arrow-up
              1
              ·
              1 day 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.