LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-21-2013, 06:58 AM   #1
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
List all files on the system that aren't part of a package


Hi,

This may be a tricky one, but here goes. I have to upgrade a server from Slackware 13.37 to Slackware 14.0. I weighed the pros and cons of upgrading vs. fresh install, and since I'm home with the flu and feeling mildly adventurous, I installed 13.37 in a virtual machine with a spare snapshot and decided to play around and see if I could manage the "live" upgrade of one major release to the next, something I've never done before (there's a first time for everything).

I read the available docs (UPGRADE.TXT, CHANGES_AND_HINTS.TXT as well as Eric Hameleers' excellent upgrade guide using slackpkg). I mainly followed the latter, experimented with some personal ideas and tweaks, and after shooting myself successfully in the foot a couple times (virtual machines come in handy to go back in time), everything works OK now.

There seems to be some useless cruft from the previous release, even after removing the corresponding packages using slackpkg clean-system, for example files like rc.hald and the likes (in fact all the stuff resulting from doinst.sh). Now I wonder: is there a way I could display all files on my system that do NOT belong to any installed Slackware package?

Cheers,

Niki
 
Old 09-21-2013, 07:34 AM   #2
jtsn
Member
 
Registered: Sep 2011
Posts: 922

Rep: Reputation: 480Reputation: 480Reputation: 480Reputation: 480Reputation: 480
Quote:
Originally Posted by kikinovak View Post
I wonder: is there a way I could display all files on my system that do NOT belong to any installed Slackware package?
Generates a sorted file list of all files of all installed packages:

Code:
cat /var/log/packages/* | grep -v '[A-Za-z0-9+ ]:' | sort | uniq | sed 's/^/\//' > pkg.file.list
Then you have to use something like find | sort | diff to compare it to the file system. You have to consider symlinks and .new files, too.
 
Old 09-21-2013, 08:52 AM   #3
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Original Poster
Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Quote:
Originally Posted by jtsn View Post
Generates a sorted file list of all files of all installed packages:

Code:
cat /var/log/packages/* | grep -v '[A-Za-z0-9+ ]:' | sort | uniq | sed 's/^/\//' > pkg.file.list
Then you have to use something like find | sort | diff to compare it to the file system. You have to consider symlinks and .new files, too.
Thanks. So far I have a complete list of files belonging to packages, as well as a system file list. Unfortunately, making a diff between the two gets me an unusable result of several thousand lines.
 
Old 09-21-2013, 09:23 AM   #4
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
to have a little more complete list I think you should need to add to the files listed in /var/log/packages the ones:
- eventually generated by the scripts in /var/log/scripts (the various doinst.sh)
- generated by the install scripts
- created/modified by the init scripts
 
Old 09-21-2013, 10:00 AM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
(just to add to the confusion :-)
If you want to list all files belonging to a Slackware package (be it installed or not) expand MANIFEST.bz2 found in /slackware, /slackware64, /source/, /testing, /patches, /extra, /pasture.

Still, you'll miss those in or coming from /isolinux, /kernels, /usb-and-pxe-installers

PS 3000th post.

Last edited by Didier Spaier; 09-21-2013 at 10:01 AM.
 
Old 09-21-2013, 10:13 AM   #6
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Original Poster
Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Thanks everybody for your input.

After careful consideration (30 seconds) I guess this is probably a case of "Keep It Simple Stupid". Manually erasing the stuff mentioned in CHANGES_AND_HINTS.TXT and leaving harmless cruft in place will probably be the best solution.

I'll mark this thread as SOLVED.

Cheers,

Niki
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to list the files for a ubuntu package ? 5883 Linux - Newbie 3 07-24-2012 06:18 PM
list installed package files and how to know which package a file belongs bujecas Slackware 3 01-09-2010 03:14 PM
Is there a way I can create a package from a list of files? Romanus81 Slackware 3 12-25-2008 11:06 AM
How to list only files belong to a package linuxcrazyguy Debian 4 04-08-2007 07:02 PM
List files in a package before installing? humbletech99 Debian 3 06-02-2006 03:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:25 PM.

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