Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 09-27-2013, 12:15 PM   #1
LQ Newbie
Registered: Jun 2011
Posts: 7

Rep: Reputation: Disabled
Question Help listing installed files and searching for missing files


I can't find a way to easily search for files installed by packages to confirm I don't have missing dependencies and was hoping someone could point me in the right direction, or help me script up what I have found so far....

What I want to be able to do is search for all files that should exist on my system (Ubuntu), by listing the contents of all installed packages, and then searching for those files in the locations they should exist in.

The reason behind this is that I have installed 3rd party NVidia drivers and want to remove them, but then how do I confirm that it hasn't removed files that were installed by another package libgl-mesa-glx for example.

That got me onto wanting to script it, so I am able to confirm the health of my system in general from time to time as packages get installed and removed over time.

I know I can use dpkg --get-selections and pipe that to a text file, and dpkg -L $package, or dlocate which will list the files installed by a given package but how can I pipe the installed packages list to dpkg, and then pipe the list of path/filenames to find to search for the files?

The other thing I'd like to be able to do is confirm the file size matches the one in the package if that's possible?

Hoping someone can help me out Thanks in advance!
Old 09-27-2013, 02:12 PM   #2
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
I searched "dpkg verify" and this answer suggests there is no simple solution.
Old 10-04-2013, 09:03 AM   #3
Registered: Mar 2013
Posts: 633

Rep: Reputation: 141Reputation: 141
To see all the files the package put onto your system, do this:
dpkg-query -L <package_name>

See Where a Package is Installed on Ubuntu

(Debian/Ubuntu) Discover what package a file belongs to
Old 10-09-2013, 07:57 PM   #4
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 18,028

Rep: Reputation: 2658Reputation: 2658Reputation: 2658Reputation: 2658Reputation: 2658Reputation: 2658Reputation: 2658Reputation: 2658Reputation: 2658Reputation: 2658Reputation: 2658
It seems to me that the simple soln is to just run an update cmd (however dpkg does that) after you've finished removing unwanted stuff.
If any reqd pkgs are missing, it will (should!) put them back


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux header files missing and v4l files unable to compile szutshi Linux - Newbie 5 09-13-2011 02:00 PM
Yum not finding/listing installed rpms - missing dependency guna_pmk Linux - Software 3 05-19-2010 05:31 AM
Missing .so files from (installed) libkrb53 arielCo Linux - Software 3 07-06-2009 08:30 AM
listing files and burning files - just a question radiodee1 Debian 1 11-26-2006 07:29 AM
Wine problem - missing files when running not installed programs TMH2 Linux - Software 2 06-28-2005 03:35 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:38 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration