LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Is there manual how to remove unnecessary stuff from Slackware? (https://www.linuxquestions.org/questions/slackware-14/is-there-manual-how-to-remove-unnecessary-stuff-from-slackware-4175723178/)

youni 03-18-2023 11:11 AM

Is there manual how to remove unnecessary stuff from Slackware?
 
I like to clean distro from different avahi, cups, wicd, networkmanager, speechdispatcher, mdadm, nfs-common and other services and packages.
Here in Slackware are many tools I won't ever use like cdrom, thunderbird, dovecot, kde.
I wish to know how to remove packages with dependencies.
Also I wish to change DM to Slim, because it is more lightweight as I think that native.
I also often use /etc/network/interfaces without networkmanager (with service networking), is it possible to use some other network service instead of NetworkManager? And how to manage services?
Sorry, I just started to read Slackware documentation only read its history, also I know its package manager does not work with dependencies... I still don't know how to control services here.

Daedra 03-18-2023 11:20 AM

Alien Bob provides mini ISO installers that will give a you a bare minimum package set that you can boot from and then build up from there by downloading other packages you want with slackpkg. However this is not newbie friendly, so be warned if you try this.

http://www.slackware.com/~alien/slackboot/mini/

hitest 03-18-2023 11:33 AM

Quote:

Originally Posted by youni (Post 6418477)
I wish to know how to remove packages with dependencies.

The # pkgtool utility will allow you to remove any package you wish. However, as you've noted Slackware does not have a dependency tracking package manager so do take care with what you remove as you can break your installation.


Quote:

Originally Posted by youni (Post 6418477)
I still don't know how to control services here.

Services are activated in the /etc/rc.d directory. As an example I have nordvpn installed on my system. To make the service active I would invoke this at a root terminal prompt.

Code:

# chmod +x /etc/rc.d/rc.nordvpn

LuckyCyborg 03-18-2023 11:36 AM

Quote:

Originally Posted by youni (Post 6418477)
I like to clean distro from different avahi, cups, wicd, networkmanager, speechdispatcher, mdadm, nfs-common and other services and packages.
Here in Slackware are many tools I won't ever use like cdrom, thunderbird, dovecot, kde.
I wish to know how to remove packages with dependencies.
Also I wish to change DM to Slim, because it is more lightweight as I think that native.
I also often use /etc/network/interfaces without networkmanager (with service networking), is it possible to use some other network service instead of NetworkManager? And how to manage services?
Sorry, I just started to read Slackware documentation only read its history, also I know its package manager does not work with dependencies... I still don't know how to control services here.

From this post, I believe that Slackware is not the distro you are looking for.

Did you really want to resolve manually the package dependencies from Slackware? Or did you expect us to do that for you? :D

As a rookie, in Slackware you should install everything. Period.

hitest 03-18-2023 11:43 AM

Quote:

Originally Posted by LuckyCyborg (Post 6418490)
As rookie, in Slackware you should install everything. Period.

Agreed. If you're new to Slackware it is recommended that you choose a full installation of Slackware. When you choose a full installation of Slackware everything works out of the box with all dependencies met. Here on LQ we prefer to offer technical support for full installations of Slackware. If you choose to customize your Slackware installation by removing packages it is assumed that you know what you're doing.

Daedra 03-18-2023 11:53 AM

Also agree, Do I full install and learn the ropes and down the road if you want to try it you can start removing packages or download the mini iso I posted above and build up from there. Even veteran slackers can have a tough time when they start removing core packages.

enorbet 03-18-2023 01:30 PM

"Unnecessary" packages in Slackware cost ONLY drive space. That's the only possible Downside. Having them in case they become needed is nothing but Upside. Unless you have limited drive space it's wise to keep everything. Unused packages use no other resources so won't affect perceived speed.

ponce 03-18-2023 02:05 PM

hi youni,

as this is a pretty common question, ruario wrote something about it on his blog some time ago

https://docs.slackware.com/slackware..._off_slackware

yvesjv 03-18-2023 02:18 PM

Actually that's not a bad idea for Youni to do.
A Slackware from scratch is very very appealing if setting up a hardened/minimal server or similar.
And from his post, appears he already knows what he wants to remove.

I'd recommend for OP to give it a go by first installing into a VM.
Once the install and dependencies have been worked out and documented, then move to a real physical device.

zeebra 03-18-2023 02:53 PM

Quote:

Originally Posted by enorbet (Post 6418514)
"Unnecessary" packages in Slackware cost ONLY drive space. That's the only possible Downside. Having them in case they become needed is nothing but Upside. Unless you have limited drive space it's wise to keep everything. Unused packages use no other resources so won't affect perceived speed.

Not only.. Some packages one might want to remove are those most frequently mentioned in "security issues", which are by many people not used at all, and which often are networked daemons (and pseudo/invisible daemons) of various types (including massive dbus stuff) which might expose the system more than you want.

Like, if you don't need AMPSS.. Or networking and/or unix port listening KDE stuff, or things like PIM.

veeall 03-18-2023 03:03 PM

I do like it leaner, so i 'removepkg' applications i never use or for which i'm using alternatives. Following is my personal uninstall list in 15.0:

Warnings!
Quote:

ksirk konquest klines knetwalk kmines klickety kjumpingcube killbots katomic picmi rocs kalzium kalgebra cantor step minuet kturtle ktouch kgeography kmplot kbruch parley kwordquiz kiten artikulate latte-dock krusader juk analitza alkimia knavalbattle kpat kdeedu-data kdiagram elisa palapeli kubrick ksudoku kdiamond khangman kanagram blinken lskat ksquares kreversi knights kmahjongg kiriki kigo kfourinline kblackbox bovo kspaceduel ksnakeduel kollision kolf kgoldrunner kbreakout kbounce kblocks kapman granatier bomber filelight kdf konqueror fcitx ibus kig kshisen xsnow gwenview joe pidgin audacious xmms audacious-plugins blackbox fluxbox fvwm geeqie gftp gkrellm mozilla-thunderbird pan windowmaker xaos xgames xine-ui xpaint xpdf xscreensaver gucharmap gnuchess thunar mousepad hplip emacs emacspeak kteatime kalarm itinerary kfloppy kjots ktimer ktimetracker minuet kstars skanlite xsane xfig kopete konversation krdc krfb ktnef sieveeditor dragon easytag kamoso kid3 elisa kmymoney xfce latte-dock digikam akregator pim-sieve-editor kget kmail-account-wizard kmail grantlee-editor pim-data-exporter alkimia cervisia kitinerary itinerary kcontacts kde-dev-scripts kde-dev-utils kdepim-addons kdepim-runtime kdesdk-kioslaves kdesdk-thumbnailers kdesignerplugin kdev-php kdev-python kdevelop kdevelop-pg-qt twm yakuake kapptemplate kirigami-gallery plasma-sdk hexchat korganizer elementary-xfce emacspeak fcitx fcitx-anthy fcitx-configtool fcitx-hangul fcitx-kkc fcitx-libpinyin fcitx-m17n fcitx-qt5 fcitx-sayura fcitx-table-extra fcitx-table-other fcitx-unikey Greybird kcm-fcitx konqueror nethack xfce4-panel-profiles xfce4-screensaver xfce4-whiskermenu-plugin falkon QtAV kruler kdeconnect-kde tigervnc nmap kwave calligraplan calligra zanshin kile kaddressbook kontact kontactinterface lokalize kontrast umbrello kcachegrind krita kimagemapeditor wpa_supplicant soma thunar-volman kbackup kmag kmousetool khelpcenter libxfce4ui libxfce4util xfce4-appfinder xfce4-clipman-plugin xfce4-dev-tools xfce4-notifyd xfce4-panel xfce4-power-manager xfce4-pulseaudio-plugin xfce4-screenshooter xfce4-session xfce4-settings xfce4-systemload-plugin xfce4-taskmanager xfce4-terminal xfce4-weather-plugin xfdesktop xfconf xfwm4 xfce4-whiskermenu-plugin tumbler garcon exo ibus-anthy ibus-hangul ibus-kkc ibus-libpinyin ibus-m17n ibus-table ibus-unikey vim-gvim akonadi-import-wizard knotes sweeper v4l-utils kleopatra bsd-games

slackpkg remove f
slackpkg remove xfce
slackpkg remove y

lostintime 03-18-2023 03:50 PM

Hi youni,

There is no recommended or official way to remove unwanted packages. One reason I use Slackware is that although Pat provides a full operating system, he isn't a bully about using Slackware in any particular way. To me that is one of the features of Slackware and a credit to Pat's expertise and attitude.

To offer some reassurance about removing packages, I do not think I ever used a full install or a stock Slackware. From the beginnning of my using Slackware more than two decades ago I have been tweaking Slackware to my needs. Slackware tends to be designed to be quite flexible in this way.

That Slackware is not compiled with dependency checking hardly means that packages cannot be removed. I have been doing that for a couple of decades. When first starting down this road, removing packges requires some patience and reading some documentation. Not a steep hill to walk.

Because I actively remove packages I routinely self-check dependencies. A quick way to test is running the following command on all files in all directories in $PATH:

Code:

ldd $path/$bin_file | grep 'not found'
A shell script more easily runs that command.

With time, experience and knowledge grows about removing packages and the process no longer seems daunting.

I also occasionally recompile stock Slackware packages to my needs.

I have several test systems in the house network as well as several Slackware virtual machines. Normally I perform related package manipulations in those systems before I do the same in the production systems.

With respect to using slim, there is an SBo build script available.

With respect to /etc/network/interfaces, there is no such file in Slackware but probably what you seek is the equivalent /etc/rc.d/rc.inet1.conf.

With respect to managing services, there is a pkgtool option to manage some services. Mostly though all that is needed is knowing how to use the chmod command. All system service files are stored in /etc/rc.d.

Slackware is a flexible distro. Do not be afraid to experiment or tinker. Slackware is designed to be one of the few distros that provides lots of breathing room to do this. Using Slackware might require some nominal sweat equity but is not designed as a walled garden.

I hope this helps!

youni 03-18-2023 04:29 PM

Quote:

Originally Posted by enorbet (Post 6418514)
"Unnecessary" packages in Slackware cost ONLY drive space. That's the only possible Downside. Having them in case they become needed is nothing but Upside. Unless you have limited drive space it's wise to keep everything. Unused packages use no other resources so won't affect perceived speed.

Thank you. Actually having cheap SSD 120Gb with 4 partitions for different os, each 20Gb, need to save space. I've installed ncdu and found these heavy packages:

I will remove without any problems:
#du -hs /usr/lib64/{thunderbird,seamonkey}
234M /usr/lib64/thunderbird
149M /usr/lib64/seamonkey

Can I remove locale package (I use only one or two locales: EN_UST.UTF8 and may be C), also TexLive never used:
# du -hs /usr/share/{locale,texmf-dist}
1.2G /usr/share/locale
496M /usr/share/texmf-dist

I also do not need services:
samba speech-dispatcher nfsd cups dovecot httpd

Also I do not know if these services are running, and how to prevent their autostart on boot:
mysqld php-fpm

keithpeter 03-18-2023 04:44 PM

Quote:

Originally Posted by youni (Post 6418571)
Also I do not know if these services are running, and how to prevent their autostart on boot:
mysqld php-fpm

My unscientific method of seeing which services are running is...

Code:

# ls -la /etc/rc.d/
Look for the rc scripts that are executable (green with an asterisk in default terminal theme), those will run on boot.

http://www.slackware.com/config/init.php

Good luck with it.

lostintime 03-18-2023 04:46 PM

Quote:

I will remove without any problems:
#du -hs /usr/lib64/{thunderbird,seamonkey}
removepkg mozilla-thunderbird seamonkey

Quote:

I also do not need services:
samba speech-dispatcher nfsd cups dovecot httpd
removepkg samba speech-dispatcher nfsd cups dovecot httpd

Quote:

Also I do not know if these services are running, and how to prevent their autostart on boot:
mysqld php-fpm
/etc/rc.d/rc.mysqld stop
chmod -x /etc/rc.d/rc.mysqld

/etc/rc.d/rc.php-fpm stop
chmod -x /etc/rc.d/rc.php-fpm

I hope that helps.


All times are GMT -5. The time now is 06:45 PM.