Eliminazione pacchetti

buon giorno: quando installo con aur(yay) dei pacchetti ovviamente scarica ed istalla tutte le dipendenze. vorrei capire se alla rimozione del pacchetto (sudo pacman -R nomepacchetto) vengono eliminate anche le dipendenze che ha scaricato.

da terminale non riporta l’eliminazione delle dipendenze, vorrei sapere come posso eliminarle assieme al pacchetto che decido di rimuovere

Non vale la pena sprecare il mio tempo. :frowning:

-c

:warning:

-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.

Using this flag might have quite unpleasant consequences, removing a whole lot more than you would have imagined.

1 Like

I don’t quite understand, in which order should I execute the commands to avoid unpleasant surprises? Also do you recommend creating a restore point with timeshift?

When you want to remove package X with all its dependencies, which are not needed by anything else:

sudo pacman -Rs X

Checking for so called “orphan” packages, namely those left behind dependencies no longer required:

pacman -Qtdq

The you could review the list to see if you want to remove them or not.

I don’t think you would need to use the -c flag at all but perhaps in very rare cases.

One of the best sources for information is ArchWiki.
Please take your time and read through some of the articles about package management on Archlinux.

Here are a couple of relevant links:

https://wiki.archlinux.org/title/Pacman

https://wiki.archlinux.org/title/Pacman/Tips_and_tricks

Also check out the command pactree.

man pactree
pactree --help

It is quite informational to get a tree view of what is dependent on what.

1 Like

Per rimuovere i pacchetti senza rimuovere le dipendenze che potrebbero essere necessarie per altri pacchetti, fare

sudo pacman -Rs <nome-del-pacchetto>, o yay -Rs <nome-del-pacchetto>

:v: