Raspberry Pi_Eng_17.3 Checking Program Package List and Status


Published Book on Amazon


All of IOT Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 1
All of IOT Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 2

출판된 한글판 도서


최신 라즈베리파이(Raspberry Pi)로 시작하는 사물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (상)
최신 라즈베리파이(Raspberry Pi)로 시작하는 사물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (하)

Original Book Contents


17.3   Checking Program Package List and Status

 

There is a way to check the program package list available in Raspberry Pi and check if the package is installed.

 

Among various methods, here are some examples of using the "dpkg" command. You can use the "dpkg l" command to look up a packages list with a certain pattern.

 

[Command Format]

dpkg   -l  <pattern>

 

[Command Overview]

   This checks the package list that satisfies specified conditions, and shows the status of the package.

   User privilege          -- Normal user.

 

[Detail Description]

   Wildcard (*) is supported when specifying pattern. That is, patterns just like "tight*" can be used.

   The first three characters of the execution result indicate the followings.

 

position

position content

available value and meaning

1

Desired action:

u = Unknown

i = Install

h = Hold

r = Remove

p = Purge

2

Package status:

n = Not-installed

c = Config-files

H = Half-installed

U = Unpacked

F = Half-configured

W = Triggers-awaiting

t = Triggers-pending

i = Installed

3

Error flags:

<empty> = (none)

R = Reinst-required

 

[Main Option]

 

 


[Used Example]

The following is an example of checking packages starting with a specific name among the currently installed packages.

 

pi@raspberrypi ~ $ dpkg l tightvnc*

Desired=Unknown/Install/Remove/Purge/Hold

| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend

|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)

||/ Name            Version      Architecture Description

+++-===============-============-============-===================================

un  tightvnc-java   <none>                    (no description available)

ii  tightvncserver  1.3.9-6.4    armhf        virtual network computing server so

 

The three alphabetic characters displayed on the far left side is information on the current status of the corresponding package and have the following meaning:

   u n           -- Desired action           -- u      -- Do not attempt to process.

-- Status                                 -- n      -- Indicates that it is not installed.

-- Error                       -- blank -- No error       

 

   i i              -- Desired action           -- i       -- Install

-- Status                      -- i       -- Indicates that it is installed      

-- Error                       -- blank -- No error