Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
9
rated 0 times [  9] [ 0]  / answers: 1 / hits: 2525  / 2 Years ago, wed, march 23, 2022, 12:22:10

I'm contemplating writing a script that does this:




  • Goes through each file in /usr/lib

  • Does a dpkg -s search on each file.

  • Reports a list of "orphan" files not belonging to any .deb package.



The idea is that over time, I've installed a lot of make install software and I'd like to get a list of leftover files from manually installed software I've since deleted.


More From » apt

 Answers
4
find /usr/lib -type f -exec dpkg -S {} + 2>&1 >/dev/null | sed -r 's/^[^/]+//'


I'll warn you now: it's slow.


[#40107] Thursday, March 24, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rstride

Total Points: 305
Total Questions: 112
Total Answers: 118

Location: Mali
Member since Sat, Dec 26, 2020
3 Years ago
;