5 ms·
I've never understood why debian insists on having these be different commands. It would make sense if install, search, upgrade and uninstall were all discrete,
by deelowe 11y ago
I've never understood why debian insists on having these be different commands. It would make sense if install, search, upgrade and uninstall were all discrete, but the way it is today feels half implemented.
- CydeWeys 11y agoSame. Having to search for what you wanted to install via apt-cache, but then actually install it via apt-get, was a triumph of some unexplainable factor over usability.
- Drdrdrq 11y agoNot sure why you were downvoted, I agree 100%. I try to use aptitude CLI for exactly this reason.
- colejohnson66 11y agoI want to say it has to do with keeping each "idea" as a separate program, but the fact that apt-get can install, uninstall, list packages, etc. seems to go against that idea
- jafingi 11y agoAnd remove an application with apt-get? I prefer yum and dnf much over apt.
- adricnet 11y agoOnly one of them requires readwrite system administrator privileges (eg sudo). apt-cache can be run by any user as it doesn't expose any secret data and can't be used to make changes. apt-get can install and uninstall software as well as download packages and thus needs root privileges in the classic UNIX model.
- pherq 11y agoapt-get source works fine without super-user privileges, so it isn't just that some have to be run as root.
- CydeWeys 11y agoapt-get doesn't fail when run as non-root, it only fails when you run it as non-root when you try to some of the commands that require root privileges (such as installing system level packages). It has lots of commands that don't need root privileges. I don't see much reason why "list all the packages available for installation", as well as the other commands in apt-cache, aren't included in that list.
- krylon 11y agoOn CentOS, I can do "yum search something" as a regular user, while "yum install something" or "yum upgrade" require root privileges. I think it's similar with the pkg command on FreeBSD.
- konfou 11y agoand same with pacman on Arch (and derivatives)
- deleted 11y ago[deleted]
- nextos 11y agoSame here, I've always found them strange. In contrast, pacman or guix are quite intuitive and feel better designed.
- hndl 11y agoI hear you. Back when I was on debian I had a small script I called apt-o ('o' for oblivious) which combined the two -- as you mention.
- currysausage 11y ago"aptitude [...] is a friendly frontend to apt." "The primary command line tool is aptitude. apt-get fulfills a similar purpose and although it is no longer the recommended primary tool some still use it." If you prefer the apt-* commands: "You can also use Wajig, for an unified and more logical command-line interface to all package management functions." (Apparently, apt is the new Wajig, except that apt doesn't automagically sudo, which Wajig did.) See https://wiki.debian.org/DebianPackageManagement https://wiki.debian.org/DebianPackageManagement
- miken123 11y agoYeah, until you do an upgrade: "The upgrade process for some previous releases recommended the use of aptitude for the upgrade. This tool is not recommended for upgrades from wheezy to jessie." See https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.en.html#upgradingpackages https://www.debian.org/releases/stable/amd64/release-notes/c...
- creshal 11y agoDebian's zigzagging between package management frontends (dselect, apt-*, aptitude, dpkg, now apt?, … all in use in parallel) is incredibly frustrating. Pacman e.g. is so much easier to use because everything's in one well-structured command.
- toyg 11y agoIt probably reflects the classic problem of developer turnover in OSS projects and the resulting approach to technical debt. Old developers fade away, young guns come through (often still in academia), "this code is all crap, let's chuck it out and build something better, how hard can it be?"...
- julian-klode 11y agoWell, just use apt(8): apt install - Install packages apt remove - Remove packages apt upgrade - Upgrade packages without removing apt full-upgrade - Upgrade packages, allowing removals apt update - Refresh sources apt show - Show a package apt list - List packages, you can filter by stuff like --installed or --upgradable
- asymmetric 11y agoThe way I see it, the distinction is that apt-get requires the network to be up, whereas apt-cache, as the name suggests, doesn't.
- __david__ 11y agoExcept for "apt-get remove".