Live data from Hacker News

The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)

mvogt.wordpress.com

11–20 of 77 posts

Re: The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)

#11
post #8

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.

Only 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.

Re: The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)

#15
post #8

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.

Same. 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.

Not sure why you were downvoted, I agree 100%. I try to use aptitude CLI for exactly this reason.

Re: The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)

#16
post #14

Is this installed by default on Debian? If not, then this is a deal-breaker for me. I might as well install aptitude which also provides a similar command line interface.

It's provided by the same package as e.g. apt-get and apt-cache, so yes.

Re: The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)

#17

Why not just alias apt=aptitude?

apt has colors, aptitude doesn't… ?

aptitude has a nice curses interface, though, which is great for resolving conflicts or other changes that require planning

Re: The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)

#18
post #8

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.

Only 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.

apt-get source works fine without super-user privileges, so it isn't just that some have to be run as root.

Re: The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)

#19

Earlier quoted context omitted.

apt has colors, aptitude doesn't… ?

aptitude has a nice curses interface, though, which is great for resolving conflicts or other changes that require planning

It also usually seems to be slower to start (at least in my experience) -- I tend to not like to use it except for resolving broken packages (since it's the nicest way to do that).

Re: The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)

#20
post #8

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.

Only 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.

apt-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.
Post reply on HN