You are not logged in.
In one of the posts replying to another thread in this area I thought I would try to use pacman -Qtd to find orphaned packages, and clean up my machine, and interestingly some of the packages it lists are not orphaned - so I wondered if this is expected behaviour or not?
Mike C
Offline
Orphaned in this case means 'installed as a dependency for another package, but no longer required'. 'Orphan' probably isn't the right term to use, but I'm lazy.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
OK - it is important to go through them and check if they are still in the repos, and also if they were perhaps still needed for the system being investigated. So hopefully someone won't simply pacman -R on each package in the list produced without further exploration.
Mike C
Offline
Oh, they can still be in the repositories, they just aren't 'needed' by your system any more, at least as far as pacman is aware. If some packages are listed that you _do_ need, let pacman know using it's -D flag.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
OK - it is important to go through them and check if they are still in the repos, and also if they were perhaps still needed for the system being investigated. So hopefully someone won't simply pacman -R on each package in the list produced without further exploration.
I frequently run `pacman -Rsn $(pacman -Qdtq)`. But I also have ensured I've properly installed the packages that I actually want on my system.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
+1 for what Trilby said... you can add an alias to your shellrc as well:
alias orphans='[[ -n $(pacman -Qdt) ]] && sudo pacman -Rs $(pacman -Qdtq) || echo "no orphans to remove"'
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
In my case if I run pacman -Qtdq one of the packages listed is plasma-mediacenter for example - but that is a standalone package in extra that I did install because I wanted to use it. Wouldn't your commands remove that package? Unless, that is, I had already gone through all of the packages that fall into this category and use the pacman -D parameter with --asexplicit<package> ? For that to work it would be necessary to have methodically changed the database attributes for every packages that you want to keep - but I was not that well organised - though it would be worth the effort in the long run!
Mike C
Offline
... but that is a standalone package in extra that I did install because I wanted to use it.
You may have wanted to use it, but you did not install it directly, it was only installed as a dependency of another package.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Trilby: yes - true!
Mike C
Offline