feed-image  ISSN 1836-5930



Receive Your Complimentary Guide to Linux NOW!


A Newbie's Getting Started Guide to Linux

Linux from Scratch - Create Your Own Linux System - Free eBook

The GNU/Linux Advanced Administration

A Complete Beginner's Manual for Ubuntu 10.04 (Lucid Lynx)




Poll

Do you care about your privacy when using a FACEBOOK?
 

linuxconfig.org
is hosted by:



Partner Linux Sites
TuxMachines
DebianAdmin
Monsterb
LinuxBloggers
AdamsInfo
LinuxScrew
FreeSoftwareLinux
All For Linux

Frequently used options for debian / ubuntu dpkg command
Article Index
1. dpkg -l
2. dpkg -L <package>
3. dpkg -p <package>
4. dpkg -s <package>
5. dpkg -S <keyword>
6. dpkg -i <package>
7. dpkg -r <package>
8. dpkg -P <package>
9. dpkg-reconfigure <package>

1. dpkg -l


List all installed packages.

EXAMPLES:

dpkg returns a number of installed packages:

$ dpkg -l | wc -l
1209

ask dpkg to return only packages related to php. This will include installed and non-installed packages:

$ dpkg -l *php*

Using dpkg with grep to see only installed packages

dpkg -l | grep php

2. dpkg -L <package>

dpkg -L will show whether the package is installed. If the package is installed dpkg will show related files and their locations whithin the filesystem.

EXAMPLES:

$ dpkg -L ntpdate
/.
/etc
/etc/network
/etc/network/if-up.d
/etc/network/if-up.d/ntpdate
/etc/logcheck
...

$ dpkg -L php5-json
Package `php5-json' is not installed.

3. dpkg -p <package>

dpkg -p will display an full information regarding to a package name provaded as an argument. The information will nclude but not limited to version, dependecies, sugested packages and more.

EXAMPLE:


$ dpkg -p dpkg
Package: dpkg
Essential: yes
Priority: required
Section: admin
Installed-Size: 7276
Origin: debian
Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
Bugs: debbugs://bugs.debian.org
Architecture: i386
Version: 1.14.28
Replaces: manpages-de (<= 0.4-3), manpages-pl (<= 20051117-1)
Pre-Depends: libc6 (>= 2.7-1), coreutils (>= 5.93-1), lzma
Suggests: apt
Conflicts: apt (<< 0.7.7), aptitude (<< 0.4.7-1), dpkg-dev (<< 1.14.16), dpkg-iasearch (<< 0.11), sysvinit (<< 2.82-1)
Size: 2353726
Description: Debian package management system
This package provides the low-level infrastructure for handling the
installation and removal of Debian software packages.
.
For Debian package development tools, install dpkg-dev.
Homepage: http://wiki.debian.org/Teams/Dpkg

4. dpkg -s <package>

dpkg -s will a status of the package suplied as an argument. This is similar to dpkg -p but also inlcudes a status and config files:

EXAMPLE:

$ dpkg -s dpkg
Package: dpkg
Essential: yes
Status: install ok installed
Priority: required
Section: admin
Installed-Size: 7276
Origin: debian
Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
Bugs: debbugs://bugs.debian.org
Architecture: i386
Version: 1.14.28
Replaces: manpages-de (<= 0.4-3), manpages-pl (<= 20051117-1)
Pre-Depends: libc6 (>= 2.7-1), coreutils (>= 5.93-1), lzma
Suggests: apt
Conflicts: apt (<< 0.7.7), aptitude (<< 0.4.7-1), dpkg-dev (<< 1.14.16), dpkg-iasearch (<< 0.11), sysvinit (<< 2.82-1)
Conffiles:
/etc/logrotate.d/dpkg 501f8c90b83c7ea180868ca82e1e82d1
/etc/dpkg/origins/debian 731423fa8ba067262f8ef37882d1e742
/etc/dpkg/dpkg.cfg f4413ffb515f8f753624ae3bb365b81b
/etc/alternatives/README 69c4ba7f08363e998e0f2e244a04f881
Description: Debian package management system
This package provides the low-level infrastructure for handling the
installation and removal of Debian software packages.
.
For Debian package development tools, install dpkg-dev.
Homepage: http://wiki.debian.org/Teams/Dpkg

5. dpkg -S <keyword>


this dpkg command will search and display filenames related to an installed package.

EXAMPLES:

$ dpkg -S dpkg.cfg
dpkg: /usr/share/man/hu/man5/dpkg.cfg.5.gz
dpkg: /usr/share/man/pl/man5/dpkg.cfg.5.gz
dpkg: /usr/share/man/sv/man5/dpkg.cfg.5.gz
dpkg: /etc/dpkg/dpkg.cfg
dpkg: /usr/share/man/fr/man5/dpkg.cfg.5.gz
dpkg: /usr/share/man/man5/dpkg.cfg.5.gz
dpkg: /usr/share/man/de/man5/dpkg.cfg.5.gz

$ dpkg -S ports.conf

apache2.2-common: /etc/apache2/ports.conf

6. dpkg -i <package>

-i option will tell dpkg to installe a package.deb. To run this command a superuser/root privilegies are required.

EXAMPLE:

# dpkg -i skype-debian_2.1.0.81-1_i386.deb

this command will install a package which is not part of the debian standard repositories. Synce dpkpg will not install a required prerequisites, dpkg may display an error that prerequisites for this package are not met.

7. dpkg -r <package>


dpkg will remove installed package but not its configurations. Root privilegies are required to execute this command.

EXAMPLE:


# dpkg -r apache2

this command will remove apache2 form system.

8. dpkg -P <package>


with -P option the dpkg command will remove and purge any configuration files related to the package.

EXAMPLE:

# dpkg -P apache2

This command will remove apache2 package from the system including its configuration files. Root permitions required.

9. dpkg-reconfigure <package>

dpkg-reconfigure is commadn of its own but related to the dpkg family and it is also worth to mention it here. dpkg-reconfigure will reconfigure alredy installed package in the system.

EXAMPLE:
# dpkg-reconfigure xserver-xorg

this command will reconfigure a xserver-xorg package. Root privilegies are required to execute this command.


Get FREE complimentary Linux Guides

The GNU/Linux Advanced Administration
The GNU/Linux systems have reached an important level of maturity, allowing to integrate them in almost any kind of work environment, from a desktop PC to the sever facilities of a big company.

In this ebook "The GNU/Linux Operating System", the main contents are related with system administration. You will learn how to install and configure several computer services, and how to optimize and synchronize the resources using GNU/Linux.

The topics covered in this 500+ page eBook include Linux network, server and data administration, Linux kernel, security, clustering, configuration, tuning, optimization, migration and coexistence with non-Linux systems. A must read for any serious Linux system admin.

A Newbie's Getting Started Guide to Linux
Learn the basics of the Linux operating systems. Get to know what it is all about, and familiarize yourself with the practical side. Basically, if you're a complete Linux newbie and looking for a quick and easy guide to get you started this is it.

You've probably heard about Linux, the free, open-source operating system that's been pushing up against Microsoft. It's way cheaper, faster, safer, and has a far bigger active community than Windows, so why aren't you on it? Don't worry, Makeuseof.com understands. Like many things, venturing off into a completely unknown world can seem rather scary, and also be pretty difficult in the beginning. It's while adapting to the unknown, that one needs a guiding, and caring hand. This guide will tell you all you need to know in 20 illustrated pages, helping you to take your first steps. Let your curiosity take you hostage and start discovering Linux today, with this manual as your guide! Don't let Makeuseof.com keep you any longer, and download the Newbie's Initiation to Linux. With this free guide you will also receive daily updates on new cool websites and programs in your email for free courtesy of MakeUseOf.

Linux from Scratch
Linux from Scratch describes the process of creating your own Linux system from scratch from an already installed Linux distribution, using nothing but the source code of software that you need.

This 318 page eBook provides readers with the background and instruction to design and build custom Linux systems. This eBook highlights the Linux from Scratch project and the benefits of using this system. Users can dictate all aspects of their system, including directory layout, script setup, and security. The resulting system will be compiled completely from the source code, and the user will be able to specify where, why, and how programs are installed. This eBook allows readers to fully customize Linux systems to their own needs and allows users more control over their system.

A Complete Beginner's Manual for Ubuntu 10.04 (Lucid Lynx)
Getting Started with Ubuntu 10.04 (Lucid Lynx) is a comprehensive beginners guide for the Ubuntu operating system; it features comprehensive guides, How Tos and information on anything you need to know after first installing Ubuntu.

Designed to be as user-friendly and easy to follow as possible, it should provide the first point of reference to any Ubuntu newcomer with lots of information. The manual has step by step instructions and includes lots of screenshots to show you how to do tasks. It also includes a Troubleshooting section to help you solve common Ubuntu problems quickly. Download this 160+ page manual today.

Comments (0)
Write comment
NOTE: To unsubscribe enter your email, select "do not dotify" with title: UNSUBSCRIBE and Send.
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
Security
Please input the anti-spam code that you can read in the image.