LinuxQuestions.org
Visit Jeremy's Blog.
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 11-02-2010, 09:40 PM   #1
abesirovic1
LQ Newbie
 
Registered: Sep 2005
Location: Germany
Distribution: Slackware
Posts: 29
Blog Entries: 1

Rep: Reputation: 6
Get list of packages not in base system


Hey all,

Is it possible to get a list of packages installed on the system that are not a part of Slackware (i.e. take all installed on system, take all packages that originally come with slack, find difference)?

Worthy to mention is that I use slackpkg and run -current.

Thanks lots.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 11-02-2010, 09:44 PM   #2
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,239

Rep: Reputation: 1898Reputation: 1898Reputation: 1898Reputation: 1898Reputation: 1898Reputation: 1898Reputation: 1898Reputation: 1898Reputation: 1898Reputation: 1898Reputation: 1898
You can use 'slackpkg clean-system' to show you the packages installed that are not part of the official Slackware tree.
 
Old 11-02-2010, 09:46 PM   #3
abesirovic1
LQ Newbie
 
Registered: Sep 2005
Location: Germany
Distribution: Slackware
Posts: 29

Original Poster
Blog Entries: 1

Rep: Reputation: 6
From slackpkg manpage:
Quote:
clean-system
This action removes all of the packages that don't belong to a standard Slackware installation. With this option, you can clean up your system,
removing third-party packages as well as any packages that were removed from the official Slackware package set.
If you have some third party (or custom built) packages that you would like to keep, you can temporarily add them to the list of blacklisted packages
before you run the 'clean-system' action.
I don't want to remove any packages nor a clean install, just to see packages I have installed by hand.
 
Old 11-02-2010, 09:59 PM   #4
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,239

Rep: Reputation: 1898Reputation: 1898Reputation: 1898Reputation: 1898Reputation: 1898Reputation: 1898Reputation: 1898Reputation: 1898Reputation: 1898Reputation: 1898Reputation: 1898
No packages will be deleted unless you say to do so. You can still scroll through the list and when done just select cancel.
 
Old 11-02-2010, 10:25 PM   #5
dc_eros
Member
 
Registered: Nov 2006
Distribution: Slackware
Posts: 294

Rep: Reputation: 39
I do slackpkg clean-system to see the third party packages installed on my Slack. However, I found it hard to dump the list into a text file. I resorted to running it, then cancel. Copy and paste to a text file then repeat again scrolling down for the next line until all packages are copied to text file.

With 78+ packages currently I have, is there a better way of dumping those list somewhere. I cannot see such option on the man page.
 
Old 11-02-2010, 11:59 PM   #6
brixtoncalling
Member
 
Registered: Jul 2008
Location: British Columbia
Distribution: Slackware current
Posts: 403

Rep: Reputation: 67
Use slackpkg
Code:
$ generate-template installed
This will give you a list of installed official Slackware packages in /etc/slackpkg/templates/installed. But you'd still have to do some cutting and grepping and diffing to compare with the output of
Code:
$ ls /var/log/packages

Last edited by brixtoncalling; 11-03-2010 at 12:00 AM.
 
Old 11-03-2010, 01:05 AM   #7
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 4,891

Rep: Reputation: Disabled
as external packages usually come with custom tags, to see them you can also filter the standard ones out with a regexp
Code:
ls -1 /var/log/packages/ | grep -v '\-[0-9]\{1,2\}$'
on my laptop (running 64-current)
Code:
# ls -1 /var/log/packages/ | grep -v '\-[0-9]\{1,2\}$' | wc -l
653
\o/

Last edited by ponce; 11-03-2010 at 02:01 AM.
 
Old 11-03-2010, 02:00 AM   #8
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840
I'm not sure if this still works (I checked it in a previous release...either 12.2 or 13.0 and it still did), but I recall this thread, which mentions this:
Code:
slackpkg -dialog=off -batch=on -default_answer=no clean-system > NonSlackwarePackages.txt
There is also this thread for those who do not wish to use slackpkg.
 
2 members found this post helpful.
Old 11-03-2010, 02:03 AM   #9
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 4,891

Rep: Reputation: Disabled
thanks for the links, very interesting threads
I'll dive into them.

Last edited by ponce; 11-03-2010 at 02:05 AM.
 
Old 11-03-2010, 02:51 AM   #10
dc_eros
Member
 
Registered: Nov 2006
Distribution: Slackware
Posts: 294

Rep: Reputation: 39
T3slider: That works!

Thanks
 
Old 11-03-2010, 02:51 AM   #11
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,239

Rep: Reputation: 1898Reputation: 1898Reputation: 1898Reputation: 1898Reputation: 1898Reputation: 1898Reputation: 1898Reputation: 1898Reputation: 1898Reputation: 1898Reputation: 1898
Just to show another way to skin the cat.
This script uses the PACKAGES.TXT file that slackpkg creates.
It will also show packages that are blacklisted in /etc/slackpkg/blacklist
Code:
#!/bin/bash

# Script to list non-official installed packages
# Official packages are referenced from PACKAGES.TXT created by slackpkg
# Installed packages are referenced from contents of /var/log/packages/

for PKG in /var/log/packages/* ; do
  if ! grep -q ${PKG##/var/log/packages/} /var/lib/slackpkg/PACKAGES.TXT ; then
    echo ${PKG##/var/log/packages/}
  fi
done

Last edited by allend; 11-03-2010 at 06:54 AM.
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting list of installed packages from a dead system ultrasawblade Debian 4 01-14-2016 12:52 PM
how to save a list of installed packages and install these packages later mandavi Ubuntu 5 09-07-2009 11:36 AM
Problem with packages - local list doesn't list all packages from a mirror simopal6 Debian 2 09-01-2008 04:44 AM
"base system" packages? garba Debian 2 06-30-2005 01:58 PM
How do I get a current list of RPM packages installed on my system? needamiracle Linux - General 1 12-06-2002 05:38 PM

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

All times are GMT -5. The time now is 12:50 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration