Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-02-2010, 09:40 PM
|
#1
|
LQ Newbie
Registered: Sep 2005
Location: Germany
Distribution: Slackware
Posts: 29
Rep:
|
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.
|
11-02-2010, 09:44 PM
|
#2
|
LQ 5k Club
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,575
|
You can use 'slackpkg clean-system' to show you the packages installed that are not part of the official Slackware tree.
|
|
|
11-02-2010, 09:46 PM
|
#3
|
LQ Newbie
Registered: Sep 2005
Location: Germany
Distribution: Slackware
Posts: 29
Original Poster
Rep:
|
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.
|
|
|
11-02-2010, 09:59 PM
|
#4
|
LQ 5k Club
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,575
|
No packages will be deleted unless you say to do so. You can still scroll through the list and when done just select cancel.
|
|
|
11-02-2010, 10:25 PM
|
#5
|
Member
Registered: Nov 2006
Distribution: Slackware
Posts: 294
Rep:
|
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.
|
|
|
11-02-2010, 11:59 PM
|
#6
|
Member
Registered: Jul 2008
Location: British Columbia
Distribution: Slackware current
Posts: 403
Rep:
|
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.
|
|
|
11-03-2010, 01:05 AM
|
#7
|
LQ Guru
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,531
|
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.
|
|
|
11-03-2010, 02:00 AM
|
#8
|
Senior Member
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367
|
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.
|
11-03-2010, 02:03 AM
|
#9
|
LQ Guru
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,531
|
thanks for the links, very interesting threads 
I'll dive into them.
Last edited by ponce; 11-03-2010 at 02:05 AM.
|
|
|
11-03-2010, 02:51 AM
|
#10
|
Member
Registered: Nov 2006
Distribution: Slackware
Posts: 294
Rep:
|
T3slider: That works!
Thanks
|
|
|
11-03-2010, 02:51 AM
|
#11
|
LQ 5k Club
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,575
|
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.
|
|
|
All times are GMT -5. The time now is 05:53 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|