848
submitted 5 months ago by cm0002@lemmy.world to c/linuxmemes@lemmy.world
top 50 comments
sorted by: hot top controversial new old
[-] truthfultemporarily@feddit.org 355 points 5 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
[-] grrgyle@slrpnk.net 126 points 5 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!

[-] dan@upvote.au 278 points 5 months ago* (last edited 5 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.

[-] fluckx@lemmy.world 73 points 5 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 ).

[-] themoonisacheese@sh.itjust.works 36 points 5 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

load more comments (9 replies)
[-] dan@upvote.au 10 points 5 months ago* (last edited 5 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 :)

load more comments (3 replies)
[-] pelya@lemmy.world 54 points 5 months ago
[-] grue@lemmy.world 39 points 5 months ago

You forgot to "beep boop." Please report for debugging.

[-] filcuk@lemmy.zip 15 points 5 months ago

Will they take me off the cron schedule?? I'm scared

load more comments (1 replies)
[-] cm0002@lemmy.world 11 points 5 months ago

You and me both, makes sense though for me LMAO

[-] Burninator05@lemmy.world 13 points 5 months ago

I always struggled with captchas and now I know why.

load more comments (1 replies)
[-] DonutsRMeh@lemmy.world 161 points 5 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.

[-] chicken@lemmy.dbzer0.com 64 points 5 months ago

TIL apt isn't literally the same thing as apt-get

load more comments (2 replies)
[-] twice_hatch@midwest.social 13 points 5 months ago

But apt-get also has install, remove, update and upgrade...

[-] cmhe@lemmy.world 37 points 5 months 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.

load more comments (2 replies)
load more comments (2 replies)
[-] nightwatch_admin@feddit.nl 92 points 5 months ago

Following this post for replies, for a friend of course

[-] RustyNova@lemmy.world 28 points 5 months ago

You may want to tell your friend to check it now!

[-] nightwatch_admin@feddit.nl 18 points 5 months ago

Friends says thanks, friend !

[-] Matombo@feddit.org 64 points 5 months ago

apt-get has a fixed format machine parseable output

apts output tries to be more human readable and is subject to change

[-] stevedice@sh.itjust.works 9 points 5 months ago

WARNING: Aptitude does not have a stable CLI interface.

load more comments (1 replies)
[-] tal@lemmy.today 46 points 5 months ago* (last edited 5 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.

[-] dan@upvote.au 24 points 5 months ago* (last edited 5 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.

load more comments (2 replies)
[-] Microw@lemm.ee 44 points 5 months ago* (last edited 5 months ago)

๐ŸŽต

APT, APT, APT, APT

Just meet me at the...

๐ŸŽต

load more comments (1 replies)
[-] ace@lemmy.ananace.dev 35 points 5 months ago

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

[-] randamumaki 32 points 5 months ago

Wait until you learn of aptitude...

[-] einlander@lemmy.world 17 points 5 months ago
load more comments (4 replies)
[-] SpaceCadet@feddit.nl 22 points 5 months ago

Me use apt. Why use many letter when few letter do trick?

load more comments (1 replies)
[-] four@lemmy.zip 18 points 5 months ago

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

load more comments (5 replies)
[-] Barometer3689@feddit.nl 18 points 5 months ago

jesus I feel old, and I am only in my 30s. I remember not having apt. How young are linux users nowadays?

[-] bluewing@lemm.ee 14 points 5 months ago

I got tennis shoes older than you, (literally a pair of original Converse I bought new back in the 1970s). I was there before the original chains of Unix, DOS, and finally Linux were foraged. I saw OS2 die in battle. And I saw the dark time of when paper and pencils and slide rules vanished from this earth.

The knowledge of apt-get and apt only matters to those warriors of the Cli when they wield the sword of sudo to vanquish the evils that exist when upgrading. For they do the bidding of the dark wizards of Dev, holders of the command su.

Now that I have demonstrated my age by showing everyone how senile I am. 'apt install' is aimed at users to give a nicer response to it's use. It need not be backwards compatible either. 'Apt-get install' is older and is meant to be usable as a lower level command and to work with other APT based tools.

What does this mean for you today? Not a damn thing. I still always type: sudo apt-get install when using a deb based dsitro out of sheer habit. But it's not needed the vast majority of the unwashed masses. So feel free to just type apt install to help prevent carpel finger nail.

load more comments (4 replies)
[-] splendoruranium@infosec.pub 11 points 5 months ago

jesus I feel old, and I am only in my 30s. I remember not having apt. How young are linux users nowadays?

Well... how old were you when you got your first computer? That young.

load more comments (12 replies)
load more comments (1 replies)
[-] pulsewidth@lemmy.world 17 points 5 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

load more comments (1 replies)
[-] Diplomjodler3@lemmy.world 16 points 5 months ago

I'll just copy whatever is in the guide I'm following at the time.

[-] victorz@lemmy.world 29 points 5 months ago* (last edited 5 months ago)

Here lie dragons. Make sure you understand commands that you run on your computer. ๐Ÿ‘

[-] mutual_ayed@sh.itjust.works 8 points 5 months ago

Cargo-culture is alive and well in the era of LLMs

[-] Rhaedas@fedia.io 8 points 5 months 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.

load more comments (2 replies)
[-] trolololol@lemmy.world 15 points 5 months ago

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

[-] AA5B@lemmy.world 12 points 5 months ago

This is one of the reasons I need to set up Linux at home. I use it at work but who knows what the flavor of the week is?

At this point I canโ€™t tell the difference between yum and rpm and apt and dnf

[-] mlg@lemmy.world 9 points 5 months ago* (last edited 5 months ago)

Edit: realized you meant in the sense of hot swapping flavors after I typed out a whole explanation lol. Should start recommending niche distros and collect package managers like trading cards lol.

--

yum = dnf, dnf is just the newer version which was rewritten several times.

apt is a weird attempt to "upgrade" apt-get with better user interface without messing with the compatibility of apt-get used by scripts and whatnot.

Both of these are dependency handling package managers which do all the magic of installing required subpackges when you want something.

rpm is the underlying system package manager which deals with the actual task of installing, removing, and generating packages in the .rpm format. It is analogous to Debian's dpkg which uses the .deb format. It's usually not used by the end user unless you need to play with a package directly like with a .rpm or .deb file.

Hence why some distros (or people) have their own dependency package manager, like zypper on OpenSUSE (rpm) or Aptitude on Debian (deb).

Although I think Aptitude might just be a fancy wrapper for apt lol.

load more comments (1 replies)
load more comments (2 replies)
[-] keen@lemmy.world 12 points 5 months ago* (last edited 5 months ago)

Use apt in the shell and use apt-get in scripts, because apt has beautiful shell output but it isn't script safe

[-] themeatbridge@lemmy.world 8 points 5 months ago

apt is for like when you want to, and apt get is the other way to get the apt. And then if it doesn't, sudo apt will, or then sudo apt get. Like if you're just doing an apt, and then you also need to apt get, you can.

load more comments (1 replies)
[-] Empricorn@feddit.nl 8 points 5 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...

[-] RustyNova@lemmy.world 7 points 5 months ago* (last edited 5 months ago)

I got mistaken. See replies for explanation

=======

Apt: get whatever is in the cached package list

Apt-get: lookup the package to see the latest version and get that one

Unless you always apt update, apt-get is the go to choice for modern day Linux

There's also the apt-apt command, who triggers any audiophile to start complaining about mainstream music quality these days

[-] superkret@feddit.org 36 points 5 months ago

I disagree. According to Debian's own documentation, apt is a newer front-end for your daily CLI updating and installing needs.
It has simplified syntax, and combines the most-used functions and options.
It is not meant for use in scripts, cause the syntax may change between versions.

The dependency-solver in the back-end is identical.

tl/dr:
apt is shorter to type and will have prettier output, starting with Debian 13.
Use apt-get inside scripts.

[-] Trimatrix@lemmy.world 10 points 5 months ago

I can concur, thats what my research also indicates. Plus I am too lazy to type apt-get

load more comments (6 replies)
load more comments (3 replies)
[-] HStone32@lemmy.world 7 points 5 months ago

Pretty sure it's basicaly

alias apt='apt-get'
[-] bitwolf@sh.itjust.works 23 points 5 months ago

There is the subtle difference that the output if apt-get is optimized for automations

Apt has pretty outputs with colors etc

load more comments (3 replies)
load more comments
view more: next โ€บ
this post was submitted on 27 Apr 2025
848 points (100.0% liked)

linuxmemes

27786 readers
172 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. ๐Ÿ‡ฌ๐Ÿ‡ง Language/ัะทั‹ะบ/Sprache
  • This is primarily an English-speaking community. ๐Ÿ‡ฌ๐Ÿ‡ง๐Ÿ‡ฆ๐Ÿ‡บ๐Ÿ‡บ๐Ÿ‡ธ
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  • 6. (NEW!) Regarding public figuresWe all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.
  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.
  • ย 

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 2 years ago
    MODERATORS