I've heard that Debian is superior to some other distributions thanks to its package managing tools APT. I cannot understand why! The only explanation - for me - is that other distro are painfully worst. I've used a little rpm tools and was quite comparable to apt, except that mostly you need to know a single command, so you've not to guess what command to execute to do what you need.
| Search and querying | |
|---|---|
| apt-cache pkgnames | Print all available packages. Useful combined with grep, if you know what you want install |
| apt-cache search package-name | Search packages that can be installed |
| apt-cache show package-name | Query informations about a package |
| apt-show-versions -u | Shows what packages may be upgraded |
| apt-file search filename | search the package name for a file you know |
| apt-file list package-name | list files of a package |
| Installing, upgrading and removing | |
| apt-get install package-name | install/upgrade one package and its dependencies |
| apt-get install package-name=version | install/upgrade to a specific package version |
| apt-get remove package-name | remove one package and its dependencies |
| dpkg -P package-name | purge packages (remove 'zombie' files) |
| apt-get -u upgrade | upgrades all installed packages and dependencies. -u means verbose, without it, you upgrade blindly! |
| apt-get -u dist-upgrade | upgrades the entire distro. -u means verbose as for the previous. Don't ask me what's difference between this and previous: only apt-developers know this secret... documentation is confusing. Really a bad interface design: these are the things that I hate of Linux. |
| Info about installed packages | |
| dpkg -l | list installed packages |
| dpkg -L package-name | list files in package. useful if you want to know where configuration files and other stuff are located |
| dpkg -S file-name | list package owning a certain file |
| Maintenance | |
| dpkg-reconfigure package-name | reconfigures the package |
| apt-get update | resynchronize index files from their sources (sources are specified in file /etc/apt/sources.list) |
| apt-get clean | Remove downloaded .deb files |
| apt-get autoclean | Remove downloaded .deb files that are nomore available for download (older?) |
Well, to manage packages you only need to remember syntax of 5 different commands... Fantastic!
Other utility that can be used:
- apt-howto: you can type this command, to browse an help file (keys chosen to browse are ridiculous! you'll need an help for using the help!)
- aptitude: not really user-friendly but functional. Almost usable.
- dselect: I tried it: I was just able to find the quit option before making damages... few!
- synaptic: Graphical package manager. I've not installed it, because on my server there's no X. People say that it's easy. I can imagine that hopefully it's like a Windows installer.
If you find any error here, please report it to me. I believe that -as for many things under Linux - it is impossible to understand if you didn't programmed it yourself. Maybe this is why with Linux anyone reinvents the same stuff - in a different fashion - over and over again...
Knok knok... Linux developers!
Search
Calendar
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jul | Sep » | |||||
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | 31 | ||||
Archives
Categories
- Android (3)
- Apple (26)
- Books (7)
- Eclipse (14)
- Errors (3)
- Firefox (7)
- Git (2)
- Hardware (16)
- Horror Code (8)
- Internet (18)
- Java (98)
- JavaScript (9)
- Life, universe and everything (45)
- Lifehacks (25)
- Linux (50)
- Opinions (25)
- OSX (4)
- Python (1)
- Software (27)
- Speeches and Conferences (8)
- Unix (3)
- Web (21)
- Windows (19)
Tag Cloud
Android apple architecture Bash colors configuration CSS Development Düsseldorf Eclipse germany Git Google Hardware hdr How-To Java JAXB job junit Karmic Linux MacBook music night Open Source Opinion oracle OSX patterns Pitfalls Practices Resume Security Software Suspend TDD Testing tip tonemapped Tricks Ubuntu video Web XML
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.
Blog License
Blogs I like
Books on the desk
Friends' Blogs
- Antonio Terreno & Valter Bernardini
- Bruno Bossola
- Daniele Galluccio
- Domenico Ventura
- Ed Schepis
- Fabrizio Gianneschi
- Luca Grulla
- Luigi Zanderighi
- Marcello Teodori
- Mida Boghetich
- Muralidharan Chandrasekaran
- Piero Ricca
- Renzo Borgatti
- Simone Bordet
- Simone Bruno
- Uberto Barbini
- Valvolog
- Webtide blogs (Greg Wilkins & Jan Bartel)
Links




















No Responses to “Debian Package Managing Survival Guide”
Please Wait
Leave a Reply