You are not logged in.
Pages: 1
Hey all, Suilenroc here. I'm a relatively new user of arch linux, and was wondering how if someone could help me with cleaning up my system. I remember that, In Ubuntu, there were a few scripts that would uninstall unneeded packages and prereqs, and other things of that nature. Also, I somehow managed to isntall a few KDE apps on my gnome system, I know not how. Konquerer and Knetworking are there. does anyone know how to delete those?
Thanks!
Offline
Oh hey, thanks. I can't seem to figure out what package Konquerer is in, as sudo pacman -R konquerer doesn't work. Do you know?
Offline
Hmm...I ran pacman -Qdt, and it lists some packages, yes, but they aren't unneeded. Is that just a danger of using that tool?
Offline
Remove unneeded dependencies: pacman -Rs $(pacman -Qtdq)
Remove package and its unneeded dependencies: pacman -Rs
I recommend aliasing the former to something (I have it set to 'pacmanro'). Alias sudo to 'sudo ' first to be able to 'sudo pacmanro'.
'pacman -Qdt' will list all packages that were installed because they were needed by packages you specifically asked to be installed, but are no longer needed by any packages. If you definitely use one of the packages it lists (be sure! It's usually correct), either edit the pacman db to say it is explicitly installed and not a dependency (should be simple, but I don't know how OTOH), or re-install with 'pacman -S'.
On a related note, 'pacman -S --asdeps' will install a package and list it as a dependency. Remember, if you don't install a package that requires the one you just named a dependency, one of the commands that lists or removes unneeded dependencies will list/remove it.
Need anything else?
Last edited by Ranguvar (2008-11-19 02:00:18)
Offline
Hey, thanks. I'm having trouble with the aliasing, though. I set an alias in ~/.bashrc of:
sudo = 'sudo'
and the pacmanro one. However, I just can't do "sudo pacmanro". It says that pacmanro is a command that's not found. What's up?
Offline
Note the space at the end of my alias - 'alias sudo='sudo '
In bash, a space at the end of an alias tells bash to look at the command following to see if it has an alias as well.
Offline
Hey, there we go! Thanks for that man, that worked wonders. I also found a nice tutorial on how to search the pacman database on my computer to find what packages certain programs belong to. I've never seen these "aliases" before. I have a feeling that they'll become very useful...
Offline
Welcome
'man bash' has a lot of info on aliases.
Offline
Remove unneeded dependencies: pacman -Rs $(pacman -Qtdq)
On my system that will remove cups. I'm rather fond of printing. This is, was, and always will be a not-so-good thing to do.
Offline
That just means you have cups installed as a dependency to a package that was removed. Just re-install cups same as any other package and it will be listed as explicity installed, and that command will not want to get rid of it.
Offline
I agree with skottish. It's probably not a good idea to run `pacman -Rs $(pacman -Qdtq)' unless you're sure you don't need any of the packages that will be uninstalled. A better idea might be just to run `pacman -Qdt' to list packages that you might want to uninstall. Then read the output, and then remove them with pacman. An even better idea might be to remove packages you don't want with `pacman -Rscn' rather than `pacman -Rs', so that you never have those unrequired dependencies lying around. Note that this carries the same risk as `pacman -Rs $(pacman -Qdtq)', so you should make sure to read pacman's output before giving it the 'y' goahead.
Offline
That just means you have cups installed as a dependency to a package that was removed. Just re-install cups same as any other package and it will be listed as explicity installed, and that command will not want to get rid of it.
I'm not doing this to prove you wrong; I was honestly curious:
~ > sudo pacman -S cups
warning: cups-1.3.9-1 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...
Targets (1): cups-1.3.9-1
Total Download Size: 3.29 MB
Total Installed Size: 15.97 MB
Proceed with installation? [Y/n] y
:: Retrieving packages from extra...
cups-1.3.9-1-x86_64 3.3M 201.0K/s 00:00:17 [#####################] 100%
checking package integrity...
(1/1) checking for file conflicts [#####################] 100%
(1/1) upgrading cups [#####################] 100%
~ > pacman -Qtdq
cups
Last edited by skottish (2008-11-19 03:33:56)
Offline
Huh! That's really odd. I've personally never had any problem with it. Worrying that pacman still thinks cups is a dependency.
Offline
Ranguvar wrote:Remove unneeded dependencies: pacman -Rs $(pacman -Qtdq)
On my system that will remove cups. I'm rather fond of printing. This is, was, and always will be a not-so-good thing to do.
On my other computer, it removes tar. So does pacman -Rcssn <any package that uses requires tar>. Hm...
Offline
That's because you used two `s' options, which will uninstall unrequired packages even if you installed them manually. Try just `pacman -Rscn <package>'.
Offline
"pacman -hQ" shows the query help information (including all info about the arguments), same goes for remove and "pacman -hR".
edit: That said, read everything and try to learn the arguments by heart, the wiki have also a section on pacman. It's a powerful tool and you can do almost everything, just read all info and don't be afraid to ask questions.
Last edited by xd-0 (2008-11-19 06:02:14)
Offline
Ranguvar wrote:Just re-install cups same as any other package and it will be listed as explicity installed, and that command will not want to get rid of it.
I'm not doing this to prove you wrong; I was honestly curious:
... ~ > pacman -Qtdq cups
I've noticed this before too. Merely calling "pacman -S package" doesn't seem to update the database record of whether the package was installed as a dependency or not. I think for reinstalls one needs to explicitly say --asdeps or --asexplicit to change that flag. (That certainly SHOULD be enough; whether it IN FACT IS enough I'm not sure. I remember sometimes I've had to resort to uninstalling/reinstalling to get the database to accept what I'm trying to tell it about whether the package is a dependency. That suggests that reinstalling with the --asdeps/--asexplicit flags wasn't enough. But I don't remember the details.)
Offline
pacman -S --asexplicit cups
Or install metapax and do "metapax --mark-explicit cups" if you don't want to do pacman's installation dance.
edit
I've just learned from Allan that "pacman -S <whatever>" doesn't change the install reason for previously installed packages. I did a quick test using the "--asdeps" and "--asexplicit" options and they work as expected.
Last edited by Xyne (2008-11-20 01:11:26)
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Pages: 1