FWIW the current recommendation is still to use apt-get in your scripts. It's less about stability and more about intention for backwards compatibility. Perfectly fine to use apt interactively, it is as you say phenominal, simple and clear.
from apt(8):
SCRIPT USAGE AND DIFFERENCES FROM OTHER APT TOOLS
The apt(8) commandline is designed as an end-user tool and it may change behavior between versions. While it tries not to break backward compatibility this is not guaranteed
either if a change seems beneficial for interactive use.
All features of apt(8) are available in dedicated APT tools like apt-get(8) and apt-cache(8) as well. apt(8) just changes the default value of some options (see apt.conf(5) and
specifically the Binary scope). So you should prefer using these commands (potentially with some additional options enabled) in your scripts as they keep backward compatibility
as much as possible.
https://manpages.debian.org/bookworm/apt/apt.8.en.html#SCRIP...
Re:Why is Debian the way it is?
by pwdisswordfishc on Sunday October 08, 2023 @03:11PM
(#37813496)
For quite some time the more uniform 'apt' frontend really didn't exist at all.
Indeed. The "apt" frontend was added in 2014 and included in a stable release in 2015.
So I don't know what tool other than apt-get could "guides first written before 2015" use.
Re:Why is Debian the way it is?
by colanderman on Sunday October 08, 2023 @05:02PM
(#37814375)
aptitude. And before that, dselect (which I believe predated APT entirely).
Re:Why is Debian the way it is?
by cassianoleal on Sunday October 08, 2023 @07:06PM
(#37815232)
Oh my, I don't miss the dselect days.
OTOH aptitude is, to this day, a joy to use.
> Apt is also just such a phenomenal package manager. It is fast out of the box,
This wasn't always the case. There's a good reason almost all guides first written before 2015 specifically instructed everyone to use 'apt-get' directly. For quite some time the more uniform 'apt' frontend really wasn't intuitive or helpful. (Just to be clear: these days it is phenomenal in its simplicity and clarity.)
And as someone who has has to dive in to the package managers' code bases, the overall quality of libapt used to be .. questionable. Figuring out code and control flows back in 2010 was like trying to rub chili out of your eyes with an unsanded wooden spoon.
But the sheer bullheaded stubbornness Debian imposes on their package universe and its architecture means it's an absolute joy to work with if you're doing any kind of distro customisation work.