[pacman] pacman -Rdt possible?

Questions et astuces concernant l'installation et la configuration d'archlinux
carafife
Hankyu
Messages : 31
Inscription : lun. 05 févr. 2018, 21:59

[pacman] pacman -Rdt possible?

Message par carafife »

Bonjour,
Je redecouvre un peu arch et pacman par la même occasion... Sur la doc j'ai vu et utilisé la commande pacman -Qdt qui affiche les fichiers orphelins mais les supprimer ensuite un par un est assez fastidueux. Peut-on utiliser un:

Code : Tout sélectionner

pacman -Rdt
Je préfere demander avant d'en faire une belle! :lol:
Merci d'avance pour vos retours
ArcoLinuxB-deepin v19.12.15 - 5.4.6-arch1-1 - Sous virtual box
Intel i7-7500U (2) @ 2.904GHz
lemust83
yeomen
Messages : 206
Inscription : ven. 11 déc. 2015, 21:20

Re: [pacman] pacman -Rdt possible?

Message par lemust83 »

Bonjour.
Si tu es certain que les orphelins peuvent être supprimés:

Code : Tout sélectionner

sudo pacman -Rs $(pacman -Qdtq)
Tour: Arch (Xfce) 64 Testing: 6-Core: AMD Ryzen 5 2600X type: MT MCP speed: 2152 MHz min/max: 2200/3600 MH
UEFI: American Megatrends v: 3803 date: 01/22/2018
Graphics:
Device-1: AMD Baffin [Radeon RX 460/560D / Pro
450/455/460/555/555X/560/560X]
driver: amdgpu v: kernel
Display: server: X.Org 1.20.8 driver: amdgpu,ati unloaded: modesetting
resolution: 1920x1080~60Hz
OpenGL: renderer: Radeon RX 560 Series
Manjaro en Dual (grub).
Avatar de l’utilisateur
benjarobin
Maître du Kyudo
Messages : 17188
Inscription : sam. 30 mai 2009, 15:48
Localisation : Lyon

Re: [pacman] pacman -Rdt possible?

Message par benjarobin »

Bonjour,
carafife a écrit : dim. 22 déc. 2019, 19:33 Je préfere demander avant d'en faire une belle! :lol:
Sinon il y a plus simple, lire le man de pacman, un petit extrait :

Code : Tout sélectionner

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.

       -n, --nosave
           Instructs pacman to ignore file backup designations. Normally, when a file is removed from the system, the database is
           checked to see if the file should be renamed with a .pacsave extension.

       -s, --recursive
           Remove each target specified including all of their dependencies, provided that (A) they are not required by other
           packages; and (B) they were not explicitly installed by the user. This operation is recursive and analogous to a
           backwards --sync operation, and it helps keep a clean system without orphans. If you want to omit condition (B), pass
           this option twice.

       -u, --unneeded
           Removes targets that are not required by any other packages. This is mostly useful when removing a group without using
           the -c option, to avoid breaking any dependencies.

Code : Tout sélectionner

TRANSACTION OPTIONS (APPLY TO -S, -R AND -U)
       -d, --nodeps
           Skips dependency version checks. Package names are still checked. Normally, pacman will always check a package’s
           dependency fields to ensure that all dependencies are installed and there are no package conflicts in the system.
           Specify this option twice to skip all dependency checks.

Code : Tout sélectionner

QUERY OPTIONS (APPLY TO -Q)
       -d, --deps
           Restrict or filter output to packages installed as dependencies. This option can be combined with -t for listing real
           orphans - packages that were installed as dependencies but are no longer required by any installed package.
Comme tu peux le voir, il n'y a pas d'option -t qui va avec -R.
De plus l'option -d n'a pas du tout le même sens avec -Q et avec -R.
Zsh | KDE | PC fixe : core i7, carte nvidia
Titre d'un sujet : [Thème] Sujet (état) / Règles du forum
Répondre