Hello friends, long time I didn't write something in this old blog. On this occasion I think it would be interesting to discuss about the command to display the installed packages (Ubuntu) in our computers. And for the bonus, I also wanna write some commands to show the installed packages in CentOS.
Open your Ubuntu's Terminal, and then run the command below (only one command line NOT two):
sudo dpkg-query -Wf '${Installed-Size} - ${Package}n \n' | sort -nAlternatively, you can use:
sudo aptitude search '?installed'And this is for CentOS to do similar job:
yum list installedFor any Linux machine with rpm installed, you can use the command below to make a list of rpms installed:
rpm -q -aTo query a single package (and get version info) use:
rpm -q package nameThe package name is the name WITHOUT the version number, so just write the letters not the number. For exmple to query the presence of mysql-server-3.23.58-16.FC3.1 use
rpm -q mysql-serverTo get a list of the files provided by a package use:
rpm -q -l package nameto find out a particular file provided by a package (very useful to find out what machine A has that provides a file Machine B needs but doesn't have)
rpm -q --whatprovides full path to file in questionTo find where files are installed use:
rpm -ql package_nameAgain, use the package name - the letters not the numbers. This will list the path to the files installed by the package.
The actual rpm database is stored in /var/lib/rpm, but you should never have to work with these files.
Via akyl.net
There is certainly a lot to find out about this issue. I love all of the points you've
ReplyDeletemade.
My web page: sex