Earlier quoted context omitted.
"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 auto…
Yeah, 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/c...
The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)
61–70 of 77 posts
Re: The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)
#62I'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.
Re: The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)
#63Earlier quoted context omitted.
I can't answer specifically for `apt`, but many commands take significantly longer if you let them display to stdout versus piping their output to a file or `/dev/null`. cf.: $ time ls -R /usr real 0m7.570s user 0m0.104s sys 0m2.286s $ time ls -R /usr > /dev/null real 0m0.193s user 0m0.036s sys 0m0.154s (edit: when will I grok HN markup?? cough support markdown cough )
I've always assumed something like the above is slow due to the terminal blocking the program to perform updates to the display. Whereas a status indicator isn't exactly pushing much data to the terminal. So, It shouldn't impact run time.
Re: The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)
#64Earlier quoted context omitted.
Yeah, 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/c...
Debian'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.
Re: The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)
#65Earlier quoted context omitted.
I can't answer specifically for `apt`, but many commands take significantly longer if you let them display to stdout versus piping their output to a file or `/dev/null`. cf.: $ time ls -R /usr real 0m7.570s user 0m0.104s sys 0m2.286s $ time ls -R /usr > /dev/null real 0m0.193s user 0m0.036s sys 0m0.154s (edit: when will I grok HN markup?? cough support markdown cough )
Did you run those two commands in sequence? Did you account for disk-cache effects? Try running it 4 times, alternating the versions and see what your last 2 times are ...
# all the below run in the same MATE desktop
# lxterm (from lxde - is easiest on my eye)
$ time ls -R /usr
real 0m19.974s
user 0m0.860s
sys 0m0.832s
# gnome terminal
$ time ls -R /usr
real 0m19.902s
user 0m0.800s
sys 0m0.776s
# xterm (yes, it really is 10x the speed)
$ time ls -R /usr
real 0m1.872s
user 0m0.856s
sys 0m0.800s
# rerun in the first terminal, and the time hasn't changed - still 19s
# now in lxterm redirecting to null
# (and xterm gives similar results here)
$ time ls -R /usr > /dev/null
real 0m0.418s
user 0m0.256s
sys 0m0.156s
All that prettification and rendering takes time; if you want raw speed, use xterm... or pipe output to /dev/null.Interestingly, 'time' on gterm and lxterm had tabs between the above field:value pairs (I had to reformat to show them nicely), but xterm used spaces. I don't know enough about the terminal underpinnings to guess as to why.
Re: The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)
#66Earlier quoted context omitted.
I can't answer specifically for `apt`, but many commands take significantly longer if you let them display to stdout versus piping their output to a file or `/dev/null`. cf.: $ time ls -R /usr real 0m7.570s user 0m0.104s sys 0m2.286s $ time ls -R /usr > /dev/null real 0m0.193s user 0m0.036s sys 0m0.154s (edit: when will I grok HN markup?? cough support markdown cough )
I've always assumed something like the above is slow due to the terminal blocking the program to perform updates to the display. Whereas a status indicator isn't exactly pushing much data to the terminal. So, It shouldn't impact run time.
Re: The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)
#67Earlier quoted context omitted.
I have this problem too. If I did myself shelling out to grep with pcre flags to find a simple library then there's a UX issue.
Search uses regular expressions so generally no need for grep unless you need more complex filters; --names-only has the -n short-form: apt-cache search -n More generally apt-get and apt-cache are designed to be backward-compatible for use in scripts whereas apt is not[0]: 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 versio…
Re: The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)
#68I'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.
I think it's similar with the pkg command on FreeBSD.
Re: The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)
#69Earlier quoted context omitted.
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.
On 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.
Re: The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)
#70Earlier quoted context omitted.
Yeah, 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/c...
Debian'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.
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