Is there a way to remove orphaned packages?

I think this perfectly illustrates what my message is. The commands deliver nothing to go blindly. You need manual interpretation and intervention.

I assume you already guessed that my fun will be to leave it as it is in such a case. Not worth the effort and negligible gain of disk space.

It’s not about disk space, but about stale libraries. The most blatant issue was with vlc. It worked fine for a long time, but recently started to deteriorate and automatic settings would no longer work. Deleting some 100 unnecessary packages fixed that. Vlc is now great again and works like a fresh install.

That is then an example of something that should never have happened and where the effort to solve it was dumped onto the users.

That is different from what the OP does and asks for. Installing a package apparently for some testing, not taking notes on what it draws in. Then, not wanting to use it anymore, he removed the package and remembers that there were dependencies installed also. For some reason (unknown to me) he wants to remove them also.

It is a question we see here asked more often and I assume that providing a solution that works in a special case for a special purpose isn’t really helping. My approach is to try to make clear that it is not that obvious to program something for what they think is easy to achieve.

Isn’t that one for the VLC packagers to address, I thought that superseded packages were removed as part of the dependency handling.

As an aside VLC is working here without problems on both Leap 15.2 and TW systems


Yes, but 


I thought that superseded packages were removed as part of the dependency handling

Removing works perfectly with a fixed set of never changing repositories. However repos are changing. They get deleted and new ones are added. As a result stale packages (“unneeded”) are left behind.

As an aside VLC is working here without problems on both Leap 15.2 and TW systems

The same here. Upon removing these packages vlc works pretty perfect again on all openSUSE systems here.

At the time of repository deletion would you not then have “orphaned” packages, and wouldn’t that be an opportune moment to decide if they should be kept or deleted?

(Or maybe I’ve the wrong end of the stick here, perhaps I should read the entire thread from the start)


I’m on Tumbleweed, but I guess there should be no difference.
I also tried to uninstall all dependencies from last install, but zypper didn’t work properly, no matter what command I used.
For example:

**sudo zypper in lxappearance **
[sudo] Passwort fĂŒr root:  
Repository-Daten werden geladen... 
Installierte Pakete werden gelesen... 
PaketabhÀngigkeiten werden aufgelöst... 

Die folgenden 11 NEUEN Pakete werden installiert:
  libImlib2-1 libobrender32 libobt2 libstartup-notification-1-0 lxappearance lxappearance-lang lxappearance-obconf lxappearance-obconf-lang obconf openbox xdg-menu 

Die folgenden 4 empfohlenen Pakete wurden automatisch gewÀhlt:
  lxappearance-lang lxappearance-obconf lxappearance-obconf-lang obconf 

11 neue Pakete zu installieren. 
GesamtgrĂ¶ĂŸe des Downloads: 1,0 MiB. Bereits im Cache gespeichert: 0 B. Nach der Operation werden zusĂ€tzlich 3,1 MiB belegt. 
**Fortfahren? [j/n/v/...? zeigt alle Optionen] (j):**

and then

**sudo zypper rm lxappearance **
[sudo] Passwort fĂŒr root:  
Installierte Pakete werden gelesen... 
PaketabhÀngigkeiten werden aufgelöst... 

Die folgenden 4 Pakete werden GELÖSCHT:
  lxappearance lxappearance-lang lxappearance-obconf lxappearance-obconf-lang 

4 zu entfernende Pakete. 
Nach dem Vorgang werden 670,4 KiB freigegeben. 
**Fortfahren? [j/n/v/...? zeigt alle Optionen] (j):**

or

**sudo zypper rm -u lxappearance **
Installierte Pakete werden gelesen... 
PaketabhÀngigkeiten werden aufgelöst... 

Die folgenden 4 Pakete werden GELÖSCHT:
  lxappearance lxappearance-lang lxappearance-obconf lxappearance-obconf-lang 

4 zu entfernende Pakete. 
Nach dem Vorgang werden 670,4 KiB freigegeben. 
**Fortfahren? [j/n/v/...? zeigt alle Optionen] (j):**

or

**sudo zypper rm --clean-deps lxappearance **
Installierte Pakete werden gelesen... 
PaketabhÀngigkeiten werden aufgelöst... 

Die folgenden 4 Pakete werden GELÖSCHT:
  lxappearance lxappearance-lang lxappearance-obconf lxappearance-obconf-lang 

4 zu entfernende Pakete. 
Nach dem Vorgang werden 670,4 KiB freigegeben. 
**Fortfahren? [j/n/v/...? zeigt alle Optionen] (j):**

So why Zypper thinks these 7 left packages are needed/used by something else if I haven’t done anything in between?

Zypper works properly. ‘zypper install’ selects recommended packages too. ‘zypper remove’ does not select recommended packages. You need to remove recommended packages explicitly.

Hmm, ok.
If you can only remove them manually, then its a nuisance, as I often want to install recommanded packages.