Linux Package Management related commands

Following command lists all the currently installed packages and captures only those lines which have the word sendmail in them
[root@badar /]# rpm -qa | grep apache
or
[root@badar /]# rpm -qa apache*


To check presence of the package 'telnet' in the system, use the following command:
[root@badar /]# rpm -q telnet


Following command lists all the information about the specific installed  package.
[root@badar /]# rpm -qi nfs


Following command lists all the documentation files and their location of a particular installed package.
[root@badar /]# rpm -qd sendmail


Following command lists file locations of all of the files of a particular installed package.
[root@badar /]# rpm -ql sendmail


Following command lists all information of the un-installed package:
[root@badar /]# rpm -qpi telnet-1.1-39.2.i586.rpm


Similarly,you can check the list of files a package contains, before actually installing it:
[root@badar /]# rpm -qpl telnet-1.1-39.2.i586.rpm


Install rpm from (mounted) SLES DVD by using the following command:
[root@badar /]# rpm -ivh /mnt/cdrom/SLES/RPMS/ssh*.rpm


If an older version of the package is installed and you want to upgrade it to a new version, then use (U):
[root@badar /]# rpm -Uvh /mnt/cdrom/SLES/RPMS/ssh*.rpm


If some version of a package is installed but some files got corrupted, and you want to re-install it then use –force with it while installing.
[root@badar /]# rpm -ivh –-force /mnt/cdrom/SLES/RPMS/ssh*.rpm


Following command erases (removes / un-installs ) a specific package.
[root@badar /]# rpm -e sendmail



Comments

Popular posts from this blog

Create Tables in Oracle Database using TOAD

How to create Oracle stored Procedures using TOAD for Oracle

How to Create Packages in Oracle Database using TOAD for Oracle