Difference pacman -Qdt and yay -Yc?

chomsky@manjaro ~ $ pacman -Qdt
atool 0.39.0-7
highlight 3.57-2
mediainfo 20.03-1
nerd-fonts-terminus 2.1.0-3
perl-image-exiftool 12.00-2
ueberzug 18.1.6-2
chomsky@manjaro ~ $ yay -Yc
checking dependencies...

Packages (15) atool-0.39.0-7  highlight-3.57-2  libimagequant-2.12.6-1  libmediainfo-20.03-1  libmms-0.6.4-3  libzen-0.4.38-2
              mediainfo-20.03-1  nerd-fonts-terminus-2.1.0-3  perl-image-exiftool-12.00-2  python-attrs-19.3.0-4
              python-docopt-0.6.2-7  python-pillow-7.2.0-1  python-psutil-5.7.2-1  python-xlib-0.27-1  ueberzug-18.1.6-2

Total Removed Size:  37,67 MiB

:: Do you want to remove these packages? [Y/n] n
chomsky@manjaro ~ $

Why does the command yay -Yc show more orphans? All the listed orphans are in the official repos, no AUR packages. Is it because yay does a better job and it’s also listing all the dependencies recursively if that’s the correct way of saying it.

And I don’t know why all of a sudden these packages are orphans, yes i didn’t explicitly install them but they came with the Manjaro i3 install.

You could check for the results from pacman -Qdt for each package with

pacman -Qi <package>

if the other packages from the yay command appear as dependencies. That would mean that yay also looks for depended packages which could be removed as well as the currently as orphane listed packages.

1 Like

That appears to be the case.

This would mean if I would remove the orphans listed with pacman -Qdt that I would get the remaining orphans listed with yay -Yc when running pacman -Qdt again? Not the most efficient way I guess.

If you remove them with sudo pacman -Rns $(pacman -Qqdt) the result will be identical.

The “n” option also remove setting files (not necessary all of them).

True.

Thanks for your reply.