I just installed Krita to test it. I do not like it and want to remove it. I can do that easily in yast, but the installation brought in many files with it. Can I remove these files even though I don’t know any of the names? Is this a case of orphaned files if I remove Krita first? I remember there is some way to remove orphan files. I just don’t know the right way!
Thank you for this. Very useful! I will always use the cleanup option when removing via yast. It removed 16 files.
Is there another zypper command to remove orphaned packages? I’m sure I have unused files since I did not know these tips prior to your post.
No, there isn’t a builtin to zypper for that.
If you’re uninstalling things with zypper, you can do zypper rm -u packagename
or zypper rm --clean-deps packagename
And that will remove any dependencies that were installed along with whatever it is.
But as far as something like apt autoremove
? Nope.
You can search for unneeded packages (packages become unneded when the main package which pulled them in got removed).
zypper pa --unneeded
You can also list them via YaST software:
I did both things. I ran the procedure in yast. It came back with 82 files! I removed them. Next, I ran the zypper command. It came back with, what I guess, is the same 82 files. But, I thought it should have come back with zero files.
Usually, zypper suggests a reboot after an update. I will try that now and see if zypper pa --unneeded come back empty.