You are not logged in.
What if pacman uses pacman -Rs by default instead of pacman -R?
When you install a program you want, you install all the necessary dependencies to make the program you want works with just a:
# pacman -S "program"
When you uninstall it you should also get rid of those dependencies without noticing because you never wanted to have them but just the program you wanted to install works, something like:
# pacman -R "program" (and it should work like the actual pacman -Rs "program")
I think is much more common to erase a program with all its dependencies than erase just the program and leave its dependencies installed in you computer, so to erase a program leaving its dependencies should be done by an extra option of R, like:
# pacman -Rk "program" (from keep dependencies) for example and it will do the actual pacman -R "program"
Also its more symetrical:
# pacman -S "program" installs everything to have "program" working
# pacman -R "program" erases everything that was installed to have "program" working
An extra idea is that newbies would ask less how to keep their system clean. ![]()
What do you think people?
Offline
I can see the logic behind this, not a bad idea.
Offline
Thanks
Offline
I sincerely don't like this idea. E.g., I use several packages which were installed as dependencies - I don't want pacman to try and remove them by default every time I remove something that needs them. The current solution is a lot more K.I.S.S. (i.e., the action taken with the least options is the most basic one - this is intuitive to me). Moreover: I am always against changing something that works well.
And you can make aliases to emulate this behavior if you wish.
arch(3) adj amused because you think you understand something better than other people ;P
Offline
I sincerely don't like this idea. E.g., I use several packages which were installed as dependencies - I don't want pacman to try and remove them by default every time I remove something that needs them.
Ok, but you could always keep them with another option, like pacman -Rk "program" as I gave as example. I understand that you might need them but which action is more commonly used, even for you: uninstall just the program and keep dependencies because you are going to need them or uninstall the program and dependencies?
The current solution is a lot more K.I.S.S. (i.e., the action taken with the least options is the most basic one - this is intuitive to me).
Ok, intuitive for me is to keep my system as it was before I install anything with the least options.
Not intuitive, for me, is to do pacman -Rs anytime I unistall something, why? because I did just a pacman -S to install it
Moreover: I am always against changing something that works well.
Yes, it works well but you can always do things even better, easier, faster, whatever.
And you can make aliases to emulate this behavior if you wish.
No I can't, I don't know how to code yet. And I think this idea is good enough not only for me but could be helpful to the arch community.
Greetings
Offline
With regards to aliases, you can write e.g.:
alias pacr='pacman -Rs'Add this to your .bashrc and you can then "pacr package" and it will remove the dependencies as well.
Actually, I have some aliases of this kind in my .bashrc. Feel free to steal them ![]()
alias yi='yaourt -S'
alias ys='yaourt -Ss'
alias yu='yaourt -Syu'
alias yr='sudo pacman -Rcsn'
alias pac='sudo pacman-color'Edit: It's easier than re-coding pacman, isn't it ![]()
Last edited by JeremyTheWicked (2008-06-17 18:28:08)
arch(3) adj amused because you think you understand something better than other people ;P
Offline
I like the idea of aliases(I've never used them), and I don't think Pacman needs to be changed.
That said, I totally agree with Benzo. I don't see a need to keep dependencies on my system that I 'might' need in the future, seems useless to me. They are still in your cache unless you clear it, and anytime you need it as a dependency it will just get pulled with whatever program needs it. Also, (R)emove, and (R)emove plus (k)eep depends seems very logical/intuitive.
I just don't see it as that important to consider changing it though, no matter how easy it would be. Unless of course, a dev wanted to do that. Or I'm sure someone could write a patch to pacman which would do just that. Might even get accepted if it the devs thought thats what the community wanted/needed. Also, the patch could always be put in the AUR, and maybe make it to an official repo.
2 cents,
Zack
Offline
Ok, thanks for this JeremyTheWicked, I didn't know that and I will steal your .bashrc for a while. Anyway I think my suggestion should be considered or at least to have a bigger debate.
Offline
Benzo, how would you deal with the following situation:
pacman -S vlc (pulls in e.g. lame as dependancy)
pacman -S mplayer (also needs lame as dependancy, but it is already installed)
pacman -R vlc
if -Rs was the default pacman would want to remove lame since it was only installed as a dependancy of vlc, not of mplayer.
Offline
Personally I agree that default removing dependencies seems to make more sense, though I imagine something as central as pacman people are reluctant to change. But if you want the devs to pay attention posting on the forums isn't the best way. Go post a feature request on the bug tracker
Offline
This is worth a thought for the devs, possibly. As I see it, modern package managers like pacman are as intelligent as their coders.
No,
pacman -S vlc (pulls in e.g. lame as dependancy)
pacman -S mplayer (also needs lame as dependancy, but it is already installed)
pacman -Rs vlc or -Rscn
will NOT (prompt to) remove lame. And anything that is an optional dependency which was installed explicitly will NOT be taken into the equation. As such, what's left are orphaned packages, which means you are NOT using them in anyway because (1) none of the installed programs source/execute them and (2) you don't know of their existence.
I need real, proper pen and paper for this.
Offline
if you want the devs to pay attention posting on the forums isn't the best way. Go post a feature request on the bug tracker
True, but I wanted to share my idea to know how good or bad it was. So I'll post it in the bug tracker.
Offline
http://bugs.archlinux.org/task/10683 this is the feature request
Offline
Dan and Xavier have spoken, and I now realise that it's not really something to think too much about
And
Ok, thanks for this JeremyTheWicked, I didn't know that and I will steal your .bashrc for a while.
explains it. Users just need this tiny bit of knowledge, and not a code change of /usr/bin/pacman. An alias is 49 lines shorter than 50 lines of diffs.
I need real, proper pen and paper for this.
Offline