Tecmint: 15 Examples of How to Use apt-get

Bet you didn't know that apt-get has so many options. If you're using Debian or a Debian/Ubuntu-based derivative, Tecmint shows many different ways of using apt-get including lesser-known uses like getting version numbers of packages, verifying packages, and fixing broken packages. Are there other ways you use apt-get? Let us know in the comments.



mfox's picture

Good article; I use apt often, but didn't know it was so versatile.

Mac user running Ubuntu 16.04 (Unity, Gnome) on Dell XPS 13 (4gb RAM, 250gb SSD)
Ubuntu 16.04, Chromixium, Remix OS and Crunchbang++ on upgraded 11.6" Acer 1810TZ Olympic Edition (4gb RAM, 240 SSD)
Ubuntu 16.04 on Mac mini, iMac & Dell 7020

I didn't know it was, either. Additionally, Tecmint seems to be a good resource for tutorials.


Computer enthusiast, beginner programmer, political geek.

I'm surprised; I make a habit of:

apt-get update && apt-get -f install

as a matter of course, having used a number of wonky distros that hadn't properly updated all of their dependencies before compiling an ISO (Dream Linux springs to mind...)

There are additional modifiers in dpkg that will also put a set of updates back on track if it should somehow come off the rails (again, very recent experiences!!)

dpkg --configure -a (-a is for "automatic", --configure executes the prepared install directives file)

completes and cleans up the installs prepared up to the point where it (the updating process) crashed, after which you can again invoke:

apt-get update && apt-get -f install

to restart the update process from the point at which it failed.

Thanks for the additional tips, Bob!


Computer enthusiast, beginner programmer, political geek.