LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-02-2014, 04:28 PM   #1
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Rep: Reputation: 195Reputation: 195
Lets say I want to remove all SBo packages (I don't)


How would I do it? From the command line, all at once?

For example when I run:

Code:
ls /var/log/packages | grep SBo
I get:
Code:
acpica-20140926-i486-1_SBo
apulse-0.1.3-i486-1_SBo
atkmm-2.22.7-i486-1_SBo
atom-0.150.0-i486-1_SBo
bullet-2.82-i486-1_SBo
cairomm-1.10.0-i486-1_SBo
docker-1.3.1-i486-1_SBo
docutils-0.11-i486-1_SBo
dvtm-0.13-i486-1_SBo
ffmpeg-2.1.5-i686_custom-1_SBo
glibmm-2.36.2-i486-1_SBo
google-go-lang-1.3.3-i486-2_SBo
gparted-0.19.0-i486-1_SBo
gst1-plugins-base-1.4.1-i486-1_SBo
gstreamer1-1.4.1-i486-1_SBo
[...]
spotify32-0.9.4.183.g644e24e.428-i386-2_SBo
tamsyn-font-1.10-noarch-1_SBo
transmission-2.84-i486-1_SBo
valgrind-3.10.0-i486-1_SBo
virtualbox-4.3.18-i486-1_SBo
virtualbox-extension-pack-4.3.18-i486-1_SBo
virtualbox-kernel-4.3.18_3.17.2_smp_zram-i486-1_SBo
x264-20131101-i486-1_SBo
xfburn-0.5.2-i486-1_SBo
How would I pass this output as an argument to removepkg?

I tried:

Code:
ls /var/log/packages | grep SBo >> list
for i in list do;
removepkg $i;
done
It didn't work and even if it did I know already it is not the best way. I am sure there is a way to pass the result of "grep" directly to removepkg. How?
 
Old 12-02-2014, 04:30 PM   #2
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Original Poster
Rep: Reputation: 195Reputation: 195
Found out I just had to use xargs

Code:
ls /var/log/packages | grep SBo | xargs removepkg
Is there a better way to do this?
 
Old 12-02-2014, 04:30 PM   #3
genss
Member
 
Registered: Nov 2013
Posts: 741

Rep: Reputation: Disabled
removepkg /var/log/packages/*SBo
 
3 members found this post helpful.
Old 12-03-2014, 05:45 AM   #4
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
You also can run:

Code:
slackpkg clean-system
which though is a GUI in ncurses, is still technically a cli tool.
 
Old 12-03-2014, 06:19 AM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,058

Rep: Reputation: Disabled
Quote:
Originally Posted by ReaperX7 View Post
You also can run:

Code:
slackpkg clean-system
which though is a GUI in ncurses, is still technically a cli tool.
Yes , but be aware that will propose you to remove not only SBo packages but more generally all packages non shipped in the Slackware distribution, so use with care.
 
Old 12-03-2014, 07:40 AM   #6
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Original Poster
Rep: Reputation: 195Reputation: 195
SBo packages were just an example, I just wanted to know how to pass the output as an argument (found out I can do that with xargs).
 
Old 12-03-2014, 07:59 AM   #7
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
You probably should also use the blacklist file provided when you use self-maintained packages.

I have several custom packages I use which are updated only at my discretion blacklisted for just such a reason.
 
Old 12-03-2014, 08:23 AM   #8
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Blog Entries: 61

Rep: Reputation: Disabled
SBo is commented out by default in /etc/slackpkg/blacklist:
Code:
# You can blacklist using regular expressions.
#
# Don't use *full* regex here, because all of the following 
# will be checked for the regex: series, name, version, arch, 
# build and fullname.
#
# This one will blacklist all SBo packages:
#[0-9]+_SBo
#
# Alien Bob's packages
[0-9]+alien
#
# ruario's latest-firefox
[0-9]+ro
#
# Nouveau
xf86-video-nouveau
 
  


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
[SOLVED] Keep SBo source packages or delete? warpalpha Slackware 2 11-12-2013 11:01 AM
Nvidia-driver.SlackBuild from SBo (or: I am a bad and sloppy SBo maintainer) kingbeowulf Slackware 8 08-31-2012 02:41 AM
Installation of packages in RHEL-5.3 using X windows menu Add/Remove packages akluthra Linux - Newbie 2 09-21-2010 05:34 AM
LXer: Firefox extension lets you remove elements from Web pages LXer Syndicated Linux News 0 05-28-2007 03:46 AM
Don't read FC2 instalation cd when add/remove packages marper Fedora 1 08-15-2004 09:18 PM

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

All times are GMT -5. The time now is 07:23 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