Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#6312 - Remove dependencies of not installed package

Attached to Project: Pacman
Opened by Jan Rüegg (rggjan) - Wednesday, 31 January 2007, 06:49 GMT
Last edited by Xavier (shining) - Friday, 27 June 2008, 15:50 GMT
Task Type Feature Request
Category
Status Closed
Assigned To Dan McGee (toofishes)
Architecture not specified
Severity Low
Priority Normal
Reported Version 0.7.2 Gimmick
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

A handy feature would be if you could remove dependencies like with "pacman -Rsc foo" but to do it when foo is already installed.
Example use: I installed the package cinelerra from aur. The ready pkg I don't have anymore. Later I uninstalled Cinelerra, but forgot to add the -sc options. When I now want to remove all the "useless" packages, that where only needed for cinelerra, I have to
-rebuild the whole package again
-install it
-remove it again with -Rsc

just to get rid of the deps...
This task depends upon

Closed by  Xavier (shining)
Friday, 27 June 2008, 15:50 GMT
Reason for closing:  Won't implement
Additional comments about closing:  Just use pacman -Qqtd
Comment by Dan McGee (toofishes) - Wednesday, 31 January 2007, 08:43 GMT
Perhaps this would work instead- look at the dependencies array for Cinelerra, and use "pacman -Rsc <insert dependencies here>". This should perform the same function.

In the same respect, a package from the synced repos that was already removed could have its dependencies checked by "pacman -Si <package>", and the above step could be taken.

Is this satisfactory? Because there is no other way to do this in pacman because the DB does not store old package entries, and thus could not look up old dependencies.
Comment by Roman Kyrylych (Romashka) - Wednesday, 31 January 2007, 11:18 GMT
You are right, Dan.
IMO it doesn't worth to implement this, and it's hard, especially for packages build for AUR.
Comment by Jan Rüegg (rggjan) - Wednesday, 31 January 2007, 17:39 GMT
"Because there is no other way to do this in pacman because the DB does not store old package entries, and thus could not look up old dependencies."

Well, it could look up the new dependencies instead... For aur it could do the same, just as "aurbuild" looks up dependencies of the packages.

But I think you're right. It isn't as important, and as I didn't know the -i option (pacman -Si) this should be fine for me...
Comment by Roman Kyrylych (Romashka) - Thursday, 22 March 2007, 13:46 GMT
Dan, now that we have -Se (install only dependencies) - this FR doesn't seem too hard.
Comment by Nagy Gabor (combo) - Monday, 03 March 2008, 15:49 GMT
Some notes:
1. This won't work with aur, since we have no repo there, so in this case user can do pacman -Rus $depends, where depends list can be figured out with the help of aur webpage.
2. Using -Rsc combination can be dangerous, I suggest -Rs only.
Comment by Nagy Gabor (combo) - Monday, 03 March 2008, 15:52 GMT
3. Using orphan listing can also help here (note: maybe it must be more than one, because if orphan1 depends on orphan2, then orphan2 becomes orphan (so will be detected) after removal of orphan1)
Comment by Xavier (shining) - Monday, 03 March 2008, 17:45 GMT
I really don't get this report.
If you were able to remove the package with just -R, then you don't need the -c flag at all.
Now, if you forgot the -s part, then no problem, that's exactly what orphans are for !

You just list the orphans whith -Qtd, then you remove them with -Rs (so that takes care of the recursive orphans, as Nagy was saying).
Comment by Allan McRae (Allan) - Friday, 27 June 2008, 15:31 GMT
Can we close this? As Xavier said, there is no need to -c unless you use -Rd to get rid of the package, in which case you should clean up your own mess. And "pacman -Qqtd" get alls the deps left of the system.

Loading...