Page 1 of 1

Command to remove package and its dependencies

Posted: 22. Nov 2015, 09:58
by rsal
I see that spi (Salix package installer) can be used to install a package along with its dependencies (if they are not needed by any other package). What command can I use to remove package and its dependencies? I could not find such a command in spi or in slapt-get. Thanks.

Re: Command to remove package and its dependencies

Posted: 22. Nov 2015, 18:03
by laprjns
There is no package manager or command in Salix or Slackware that removes a package and its dependencies.

Re: Command to remove package and its dependencies

Posted: 23. Nov 2015, 00:08
by rsal
Does Gslapt tries to do this? When I try to uninstall samba package in Gslapt, it also marks vlc, gvfs and gigolo for removal. I cannot understand this. Is samba a dependency of vlc?

Re: Command to remove package and its dependencies

Posted: 23. Nov 2015, 01:19
by laprjns
rsal wrote:Does Gslapt tries to do this?
No it does not remove the package dependencies.
rsal wrote:When I try to uninstall samba package in Gslapt, it also marks vlc, gvfs and gigolo for removal
Well this is the opposite of what you asked. When your remove a package with Gslapt or slapt-get, it will also try to remove all the installed packages that depend on it. Using your example of Samba, if I try to remove it on my system here what I get

Code: Select all

rich[~]$ sudo slapt-get --remove samba
Password: 
Reading Package Lists...Done
The following packages will be REMOVED:
  gvfs gigolo kde-runtime xine-lib samba 
0 upgraded, 0 reinstalled, 0 newly installed, 5 to remove, 0 not upgraded.
After unpacking 87.5MB disk space will be freed.
Do you want to continue? [y/N] 
On my system it wants to uninstall gvfs, gigolo, kde-runtime, xine-lib, all packages that I have install that depend on samba. Without samba installed these package will not function properly or a least certain function of the packages will not work.
rsal wrote:Is samba a dependency of vlc?
Yes, the vlc package available in the Salix repo has samba as a dependency.

Code: Select all

rich[~]$ sudo slapt-get --show vlc
Password: 
Package Name: vlc
Package Mirror: http://download.salixos.org/x86_64/14.1/
Package Priority: Preferred
Package Location: ./salix/xap
Package Version: 2.1.2-x86_64-1dj
Package Size: 8460 K
Package Installed Size: 33840 K
Package Required:   a52dec,aalib,alsa-lib,atk,attr,avahi,bzip2,cairo,celt,chromaprint,cxxlibs|gcc-g++,cyrus-sasl,dbus,expat,faad2,ffmpeg,fftw,flac,fontconfig,freeglut,freerdp,freetype,fribidi,gcc,gdk-pixbuf2,glew,glib2,glu,gmp,gnutls,gpm,gtk+2,harfbuzz,icu4c,jack,lame,libICE,libSM,libX11,libXau,libXcomposite,libXcursor,libXdamage,libXdmcp,libXext,libXfixes,libXi,libXinerama,libXmu,libXpm,libXrandr,libXrender,libXt,libXxf86vm,libass,libavc1394,libbluray,libcaca,libcap,libcddb,libcdio,libcroco,libdca,libdrm,libdvdnav,libdvdread,libffi,libgcrypt,libgpg-error,libidn,libjpeg,libkate,libmad,libmodplug,libmpeg2,libmtp,libnotify,libogg,libpng,libraw1394,librsvg,libsamplerate,libshout,libtheora,libtiff,libupnp,libusb,libvorbis,libvpx,libxcb,libxkbfile,libxml2,lua,mesa,musepack-tools,ncurses,nettle,opencore-amr,openldap-client,openssl-solibs|openssl,opus,orc,p11-kit,pango,pixman,projectM,qt,readline,rtmpdump,[b]samba,schroedinger,sdl,slang,speex,svgalib,taglib,twolame,udev,util-linux,vcdimager,wavpack,x264,xcb-util-keysyms,xvidcore,xz,zlib
Package Conflicts:   
Package Suggests:   
Package MD5 Sum:  756997b652c77cc06034257b5b5f0442
Package Description:
 vlc - a multimedia player
 
 VLC (initially VideoLAN Client) is a highly portable multimedia player
 for various A/V formats (MPEG-1, MPEG-2, MPEG-4, DivX, mp3, ogg,...)
 as well as DVDs, VCDs, and various streaming protocols. It can also be
 used as a server to stream in unicast or multicast in IPv4 or IPv6 on
 a high-bandwidth network.
 
 
Package ChangeLog:
 Added.  Upgraded from 14.0.

Package Installed: no

Re: Command to remove package and its dependencies

Posted: 25. Nov 2015, 04:36
by rsal
I had earlier installed vlc through Gslapt and it installed many other packages, presumably dependencies of vlc. Now when I try to remove vlc through Gslapt, it is removing only vlc package. It seems that Gslapt/slapt-get are performing only "one-way dependency check". This may lead to accumulation of many unused libraries in the long run.

Is there any application that can identify unused libraries/packages on SalixOS system? Thanks for your guidance.

Re: Command to remove package and its dependencies

Posted: 25. Nov 2015, 10:43
by mimosa
This may lead to accumulation of many unused libraries in the long run.
This is very unlikely to be a problem. If there is that little space in your / partition, you should probably have a clearout of things that take up a lot more room than they do.
Is there any application that can identify unused libraries/packages on SalixOS system?
No. But you might like twapake (it's in Salix repos).

Code: Select all

sudo twapake -u
will give you a list of installed packages in reverse date order, with an option to remove them individually. The ones you are concerned about will appear just above (or possibly below) vlc. However, there is really no need - and you risk removing something needed by another application.

EDIT Corrected to reflect order of twapake output! (An example of how easy it is to shoot yourself in the foot once you start messing like that.)

Re: Command to remove package and its dependencies

Posted: 25. Nov 2015, 11:25
by Papasot
rsal wrote:It seems that Gslapt/slapt-get are performing only "one-way dependency check". This may lead to accumulation of many unused libraries in the long run.
Such a functionality is the only thing I am missing from my old apt-get based distros. But don't forget Salix is Slackware-based, and Slackware itself completely ignores dependency checking, assuming everything is installed - you need it or not. At least Salix offers that "one-way" dependency checking.
Although I would be more than happy to see the "reverse dependency checking" you are asking for implemented in Salix, I think the rock-solid stability of the system and the complete absence of the systemd plague more than overcome the missing reverse dependency checking.

Re: Command to remove package and its dependencies

Posted: 25. Nov 2015, 15:57
by gapan
This is the "orphans" issue again. Such functionality is absolutely dangerous and we will never have that. See my reply in the following post and the reply from Shador that comes right after mine:
http://forum.salixos.org/viewtopic.php? ... 2670#p2665

More threads with discussion on this:
http://forum.salixos.org/viewtopic.php?f=16&t=2549
http://forum.salixos.org/viewtopic.php?f=22&t=856