Command to remove package and its dependencies

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
rsal
Posts: 198
Joined: 12. Mar 2012, 17:00

Command to remove package and its dependencies

Post 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.
User avatar
laprjns
Salix Warrior
Posts: 1112
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: Command to remove package and its dependencies

Post by laprjns »

There is no package manager or command in Salix or Slackware that removes a package and its dependencies.
“The past was erased, the erasure was forgotten, the lie became the truth.”
― George Orwell, 1984
rsal
Posts: 198
Joined: 12. Mar 2012, 17:00

Re: Command to remove package and its dependencies

Post 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?
User avatar
laprjns
Salix Warrior
Posts: 1112
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: Command to remove package and its dependencies

Post 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
“The past was erased, the erasure was forgotten, the lie became the truth.”
― George Orwell, 1984
rsal
Posts: 198
Joined: 12. Mar 2012, 17:00

Re: Command to remove package and its dependencies

Post 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.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Command to remove package and its dependencies

Post 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.)
User avatar
Papasot
Donor
Posts: 250
Joined: 3. May 2015, 18:37
Location: Patras, Greece

Re: Command to remove package and its dependencies

Post 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.
A pleasant detail in this forum: several people pick a picture of their pet as their avatar. Who am I to do otherwise? ;-)
User avatar
gapan
Salix Wizard
Posts: 6349
Joined: 6. Jun 2009, 17:40

Re: Command to remove package and its dependencies

Post 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
Image
Image
Post Reply