The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)
mvogt.wordpress.com
mvogt.wordpress.com
I think it's similar with the pkg command on FreeBSD.
In contrast, pacman or guix are quite intuitive and feel better designed.
"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.)
"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...
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
2. Why full-upgrade and not dist-upgrade like in all the other debian package managers? Would that little bit of internal consistency really have hurt?
3. Still does not seem to cover all use cases.
Fixed that for you.
apt-cache search -n <regexp>
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 versions. While it tries not to break backward compatibility this is not guaranteed either if a change seems beneficial for interactive use.
[0] http://manpages.ubuntu.com/manpages/xenial/en/man8/apt.8.htm... $ 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) # 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.
Whereas a status indicator isn't exactly pushing much data to the terminal. So, It shouldn't impact run time.
I switched to debian some time ago and it's interesting so many different commands are used for package management, this said I personally have an alias ap=sudo aptitude -t jessie-backports alias and use that as a command line interface for search/install, and run the full aptitude gui only when doing updates
https://pypi.python.org/pypi/apt-wrapper/
No prog bar but it handles all common tasks, ppa's, and elevates with sudo automatically. For example:
> pip install apt-wrapper
> apt in foobar apt-get -y update
apt-get -y upgrade
apt-get -y dist-upgrade
apt-get -y autoremove
I run that everyday.You can also set the update to happen automatically so that all you have to do is run upgrade.
> You can also set the update to happen automatically so that all you have to do is run upgrade.
I'm in "testing". Sometimes, even with "-y", I'm asked to validate some messages (often inside a vi prompt).
http://askubuntu.com/questions/3167/what-is-difference-betwe...
It cleans out unnecessary packages.
All the update does is download the latest available updates so it should not be prompting. My experience is that only upgrade/dist-upgrade will prompt.
I've got a VM running ubuntu 16.04-beta and it seems to be fine.
> My experience is that only upgrade/dist-upgrade will prompt.
Source: my previous life.
I tried it a bit but it's very (very) unstable :-)
I come from Fedora and have few months only on debian. Still a rookie.
My experience is a "non-beta" Fedora is less stable than a "testing" debian.
> ...Using it as your main desktop machine is a recipe for trouble ...
Yes! It's a nightmare especially with Gnome Shell.
I see memory corruptions for months in Gnome windows. I wonder if it's related to Wayland stuff. It often occurs in Firefox.
aptitude -y safe-upgrade
...which is less likely to break things. Every month or so I go into aptitude to manually sort things out that have gotten their dependencies wedged.Interesting. My use of aptitude is limited to "search" so far.
Did you see that?
Any terminal settings I need to adjust? I'm using OS X's Terminal.app, terminal declared as xterm-256color, via SSH, under zsh.