Is it safe to just remove all unused packages using sudo pacman -Scc or using yay -c? Will I end up deleting important packages as well? How can I make sure that there are no important packages getting list of orphaned packages
I see that go and breath2-wallpaper are on there, that is why I feel like this might not go well. Expecially go.
Also will doing sudo pacman -Scc do any damaging changes like deleting important stuff or will it just clear the cache?
-Scc flag is used to clean up all local caches so no important stuff will be deleted. You can use pacman -Rs $(pacman -Qtdq) to remove dependencies that are no longer needed, because e.g. the package which needed the dependencies was removed.
REMOVE OPTIONS (APPLY TO -R)
-c, --cascade
Remove all target packages, as well as all packages that depend on one or more target packages. This operation is recursive and must be used with care, since it can remove many potentially needed packages.
So I’m guessing it’s only safe if you’re very careful, as mentioned there. A safer wat to do this, I’m thinking, would be:
pamac remove $(pamac list --orphans --quiet )
BUT that’s only what I think, and I might be wrong, so if you do this, it’s at own risk.
I have 146 orphan packages, personally, and I leave them. They’re not doing any harm AFAIK.
pamac list --orphans --quiet gave me the exact same list of packages. Also I have more than a GB worth of disk space used by orphans alone, I was thinking about clearing that up, that is all.
Thanks, cleared cache. So thats done.
About Orphans, the topic you’ve quoted solves half of my concern, but about golang.
But I don’t remember installing golang manually, that probably explains that.
Now I just noticed nodejs is also there and that seems fishy because I am a developer and I do use nodejs often.
Otherwise everything else seems like unused deps. So I’m gonna ahead and remove all stuff. I can just re-install node.
i use pamac only for the functionality i listed, not that i think it is inferior. just that for installing/upgrading/removing packages, IMO pamac gives me the sense of being in control of whats happening and less like likeliness of failure inbetween operations.