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 01-18-2016, 12:40 PM   #1
Rinndalir
Member
 
Registered: Sep 2015
Posts: 733

Rep: Reputation: Disabled
Reducing number of installed packages.


New year and a little house cleaning. I ran ls -1 /var/log/packages|wc -l and it's over 1000! Many I had never heard of so I am removing them.

What I really need is to have a monitor watching the system and creating a list of files that have been loaded/used in the last 6-8 months or so.

Does anyone know if such a monitor exists? I was thinking back to tripwire or something like that.

How many does ls -1 /var/log/packages|wc -l does your -current show?

It will save me a lot of time updating -current to have fewer packages.
 
Old 01-18-2016, 01:02 PM   #2
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,407
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
Reducing number of installed packages.

Slackware is expected to be fully installed. You might run in dependencies troubles unless being very careful removing packages...
 
Old 01-18-2016, 01:08 PM   #3
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,524

Rep: Reputation: 8493Reputation: 8493Reputation: 8493Reputation: 8493Reputation: 8493Reputation: 8493Reputation: 8493Reputation: 8493Reputation: 8493Reputation: 8493Reputation: 8493
Quote:
Originally Posted by Tonus View Post
Slackware is expected to be fully installed. You might run in dependencies troubles unless being very careful removing packages...
Indeed. The idea that dropping random packages (or even carefully selected packages) will "save me a lot of time updating -current" is not likely to be correct.
 
3 members found this post helpful.
Old 01-18-2016, 02:45 PM   #4
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Rep: Reputation: Disabled
Some of us still enjoy using a more minimal install and being able to remove and recompile packages as needed is a great learning experience. Sure it may not make much difference in system upgrades except for potentially complicating them and hard drive space is not a concern for most people, but benefits in learning how your system works are well worth it.

On my system I use this script I found in an old arch forum post and modified slightly for slackware to make sure I did not remove anything important or to track down what extra packages need to be recompiled after an update. It works for my use case, but it probably needs a little work to be made more portable.

Code:
#!/bin/sh
#  2004/08/22  K. Piche  Find missing library references.
#  2015/11/27  orbea     Refreshed script

ifs=$IFS
IFS=':'

ARCH=$(uname -m)

libdirs="/lib:/usr/lib:/usr/X11R6/lib:/usr/libexec:/usr/$ARCH-slackware-linux:/lib64:/usr/lib64:/usr/X11R6/lib64"
extras=

#  Check ELF binaries in the PATH and specified dir trees.
for tree in $PATH $libdirs $extras
do
        echo DIR $tree

        #  Get list of files in tree.
        files=$(find $tree -type f)
        IFS=$ifs
        for i in $files
        do
                if [ `file $i | grep -c 'ELF'` -ne 0 ]; then
                        #  Is an ELF binary.
                        if [ `ldd $i 2>/dev/null | grep -c 'not found'` -ne 0 ]; then
                                #  Missing lib.
                                echo "$i:"
                                ldd $i 2>/dev/null | grep 'not found'
                        fi
                fi
        done
done

exit
For comparison here is my customized /etc/slackpkg/blacklist
Code:
# This one will blacklist all SBo packages:
[0-9]+_SBo
[0-9]+alien
[0-9]+compat32
[0-9]+_SBocompat32
[0-9]+_git

sbopkg

kde/*
kdei/*
xfce/*

# a
elilo
grub
floppy
mt-st
mtx
pcmciautils
upower

# ap
nano
pamixer
radeontool
sox
usbmuxd

# d
cvs
Cython
mercurial
rcs
ruby
subversion

# l
akonadi
alsa-plugins
attica
automoc4
GConf
glib-networking
grantlee
gst-plugins-good
gst-plugins-good0
gtkmm3
herqq
json-c
libasyncns
libart_lgpl
libbluedevil
libproxy
libimobiledevice
libgpod
liblastfm
libusbmuxd
libvncserver
libwnck
libcanberra
mm
neon
newt
pilot-link
polkit-qt
phonon*
pulseaudio
qca*
qimageblitz
qjson
QScintilla
qt-gstreamer
qtscriptgenerator
sbc
shared-desktop-ontologies
slang
slang1
soprano
speexdsp
strigi
taglib-extras
v4l-utils
vte

# n
bluez
cifs-utils
epic5
mcabber
mobile-broadband-provider-info
ModemManager
netatalk
NetworkManager
obex-data-server
obexfs
obexftp
openobex
php
samba
wpa_supplicant

# x
intel-gpu-tools
libva
seamonkey
xf86-input-acecad
xf86-input-penmount
xf86-input-synaptics
xf86-input-wacom
xf86-video-amdgpu
xf86-video-apm
xf86-video-ark
xf86-video-ast
xf86-video-ati
xf86-video-chips
xf86-video-cirrus
xf86-video-glint
xf86-video-i128
xf86-video-i740
xf86-video-intel
xf86-video-mach64
xf86-video-mga
xf86-video-neomagic
xf86-video-openchrome
xf86-video-r128
xf86-video-rendition
xf86-video-s3
xf86-video-s3virge
xf86-video-savage
xf86-video-siliconmotion
xf86-video-sis
xf86-video-sisusb
xf86-video-tdfx
xf86-video-tga
xf86-video-trident
xf86-video-tseng
xf86-video-voodoo
xf86-video-xgi-git
xf86-video-xgixp

# xap
audacious
blackbox
blueman
electricsheep
fvwm
geeqie
gv
mozilla-thunderbird
MPlayer
network-manager-applet
pavucontrol
pidgin
rxvt
sane
x3270
xchat
xine
xlockmore
xpdf
xsane

# freeslack
getty-ps
lha
unarj
amp
ipw2100-fw
ipw2200-fw
trn
zd1211-firmware
xfractint
xgames
xv

# git
libdrm
mesa
xf86-video-nouveau
 
2 members found this post helpful.
Old 01-18-2016, 04:46 PM   #5
qweasd
Member
 
Registered: May 2010
Posts: 621

Rep: Reputation: Disabled
OT, but orbea, you may want to add bluez-firmware to that list Somehow we missed it for several months, so the very early versions of the list omitted it.
 
Old 01-18-2016, 04:54 PM   #6
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,242

Rep: Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322
Quote:
Originally Posted by Rinndalir View Post
It will save me a lot of time updating -current to have fewer packages.
Why is that the case?

Are you on a slow connection?

Are you not using slackpkg?
 
Old 01-18-2016, 05:34 PM   #7
elcore
Senior Member
 
Registered: Sep 2014
Distribution: Slackware
Posts: 1,754

Rep: Reputation: Disabled
Yes, the trimming procedure can be time consuming and is unsupported. I could have full install on my build machine, but not on my netbook, where I can only spare 3,5G
Problem is when I compile something on full install, makefile will sometimes autodetect, and then depend on wide variety of things that don't exist on netbook.
So one could say trimming does save some time in the long run, because packages build much faster on desktop, and I won't have to define deps manually if the two systems are identical.

I'd say stable 14.1 is a much better target for discarding packages, because -current requirements change all the time.
These are just some of the things I build custom for both -curent and stable:
Code:
MPlayer     cairo    gtk-engines    libvdpau  opentyrian  thunar-archive-plugin
OpenAL        edid     gtksourceview  libvpx    qmmp      wine
SDL2        ffmpeg   icecat        mc          smplayer      xarchiver
SDL2_image  fluxbox  iotop        mousepad  sqlite      xfce
So far only GNU IceCat is a pain to compile, because with the exception of zlib, it's building it's own separate libs and this takes hours.
Apart from that small inconvenience, and kde being a standard tentackled freedesktop mess, it all works nicely on top of 2G base system with X.
 
Old 01-18-2016, 06:08 PM   #8
commandlinegamer
Member
 
Registered: Dec 2007
Posts: 163

Rep: Reputation: 51
I'm not fussy about removing packages as I used to be. I still dump sendmail though, most of the text editors, and am leaning away from KDE in favour of XFCE.

I certainly wouldn't recommend anyone remove stuff willy-nilly, but there's a fair amount of duplication of tools.
 
2 members found this post helpful.
Old 01-19-2016, 08:12 AM   #9
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Rep: Reputation: Disabled
Quote:
Originally Posted by qweasd View Post
OT, but orbea, you may want to add bluez-firmware to that list Somehow we missed it for several months, so the very early versions of the list omitted it.
I don't have bluez-firmware on my system, it seems blacklisting just bluez is enough to get rid of both bluez and bluez-firmware.
 
Old 01-20-2016, 02:49 PM   #10
Rinndalir
Member
 
Registered: Sep 2015
Posts: 733

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Tonus View Post
You might run in dependencies troubles unless being very careful removing packages...
For example I removed yptools. I also removed a couple that were for mt. Does anyone hear even remember what mt stands for? I chuckled with nostalgia when I found those.

I also removed any that were for KDE.

BTW How many does ls -1 /var/log/packages|wc -l does your -current show?
 
Old 01-20-2016, 03:13 PM   #11
Rinndalir
Member
 
Registered: Sep 2015
Posts: 733

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by orbea View Post
On my system I use this script I found in an old arch forum post and modified slightly for slackware to make sure I did not remove anything important or to track down what extra packages need to be recompiled after an update. It works for my use case, but it probably needs a little work to be made more portable.

I will look at this script. I haven't used the blacklist feature as you have. This makes sense to do it this way.

Another question, can't you just comment out the SBo mirrors so ou don't get those packages?


Also Orbea is a high-end bike maker in the Basque country of Spain. Not that well known by most.
At least that is how I know the word orbea.
 
Old 01-20-2016, 07:19 PM   #12
zakame
Member
 
Registered: Apr 2012
Location: Philippines
Distribution: Debian, Ubuntu, Slackware
Posts: 295

Rep: Reputation: 181Reputation: 181
Quote:
Originally Posted by Rinndalir View Post
What I really need is to have a monitor watching the system and creating a list of files that have been loaded/used in the last 6-8 months or so.

Does anyone know if such a monitor exists? I was thinking back to tripwire or something like that.
Yeah, some file-based IDS would do it. The way you describe it, it seems similar to what OpenBSD's security(8) script would output; perhaps worth checking out and refit for Slackware.

The other way to achieve some minimalism here would be to start from a base list of packages (e.g. something like what I did for building my Docker slackware image and add the packages you need, instead of pruning from a full Slackware install.

Last edited by zakame; 01-20-2016 at 07:20 PM. Reason: typo
 
Old 01-21-2016, 02:08 PM   #13
MarcT
Member
 
Registered: Jan 2009
Location: UK
Distribution: Slackware 14.2
Posts: 125

Rep: Reputation: 51
Talking

Quote:
Originally Posted by Rinndalir View Post
I also removed a couple that were for mt. Does anyone hear even remember what mt stands for? I chuckled with nostalgia when I found those.
Well, we still have DAT and LTO tape drives, so the magnetic tape (mt) packages are still relevant here.
 
Old 01-21-2016, 02:22 PM   #14
Rinndalir
Member
 
Registered: Sep 2015
Posts: 733

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by zakame View Post
Yeah, some file-based IDS would do it. The way you describe it, it seems similar to what OpenBSD's security(8) script would output; perhaps worth checking out and refit for Slackware.
I will have a look at that. It has to be something that's not obtrusive and adds very little or no overhead to be useful.


Quote:
The other way to achieve some minimalism here would be to start from a base list of packages (e.g. something like what I did for building my Docker slackware image and add the packages you need, instead of pruning from a full Slackware install.
Is docker using containers? I have sworn off them until they are actually working as described in the docs. Which may be never.
 
Old 01-21-2016, 02:25 PM   #15
Rinndalir
Member
 
Registered: Sep 2015
Posts: 733

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MarcT View Post
Well, we still have DAT and LTO tape drives, so the magnetic tape (mt) packages are still relevant here.

I guess it's a viable option still. Has the technology changed at all? i.e. data densities, materials, speed, etc.?
I wish I had a DAT drive still. I have some data on DAT but no drive. Will have to take them somewhere.
 
  


Reply

Tags
-current, package management, packages



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] Reducing writes on Lubuntu installed on SSDs using RAMdisks, am I doing it right? maples Linux - Newbie 3 03-19-2014 01:13 AM
installed rpm packages database: explicit and dependency packages leniviy Linux - Newbie 4 09-07-2012 03:31 AM
[SOLVED] List number of packages available / installed replica9000 Debian 2 03-17-2011 12:17 PM
how to save a list of installed packages and install these packages later mandavi Ubuntu 5 09-07-2009 11:36 AM
Sort installed packages by # of dependant packages installed brianez21 Debian 1 01-18-2006 05:06 PM

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

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