LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   how to check if a packet is installed (https://www.linuxquestions.org/questions/debian-26/how-to-check-if-a-packet-is-installed-552396/)

htamayo 05-08-2007 04:52 PM

how to check if a packet is installed
 
Hi, well before I install other packages, i have a basic question:

is there a way to check what packages I have installed currently?

thanks

I'm really newbie

Dutch Master 05-08-2007 05:08 PM

Yes, and pretty simple too!
Code:

dpkg --get-selections > selections.txt
Then open the file selections.txt in your favourite editor. Make sure you exectute the command as root. Open a terminal, and issue the su command. Type in your root password, hit enter. Now you're root. BE CAREFULL!! With these powers you're capable of completely whiping your disk(s) clean w/o any complaint by the system! Now run the above command. The text file is created in the current directory. You need to do one more thing, change the permissions of the file so you can read it as a normal user:
Code:

chmod 755 selections.txt

DeanLinkous 05-08-2007 06:28 PM

Desktop>Administration>Synaptic Package Manager
click on INSTALLED

lineman60 05-08-2007 06:32 PM

3rd way
 
insted of SU -
use
Code:

sudo dpkg --get-selections > selections.txt

farslayer 05-08-2007 06:45 PM

you can also use apt to query for one specific package..

apt-cache policy <packagename>
Code:

debian:~$ apt-cache policy firefox 
firefox:
  Installed: 2.0.0.3-2
  Candidate: 2.0.0.3-2
  Version table:
 *** 2.0.0.3-2 0
        500 ftp://ftp.uwsg.indiana.edu sid/main Packages
        100 /var/lib/dpkg/status

Querying for installed packages with dpkg or apt-cache does not require you to be root... so su - and sudo are actually overkill

mastrboy 05-09-2007 02:20 AM

i would do sudo dpkg --get-selections|grep -i "package name"


All times are GMT -5. The time now is 01:17 AM.