You are not logged in.

#1 2012-04-21 11:43:52

sheomualjy
Member
Registered: 2011-12-23
Posts: 37

Is there a way to remove packages that are installed as dependencies?

Hi,

I recently tried out GDM, and found that I don't like it. I now wish to remove it, along with all the dependencies that were installed along with it.
However, I cannot find a way to list the dependencies of GDM, so that I can remove those as well.

The pacman manual mentioned --cascade and --recursive , however cascade does not list anything else, and recursive includes WAY too many extra packages, many of which I actually need.

Is there a way to remove the packages that were installed along with GDM, but nothing more and nothing less?

Thanks,
James

Offline

#2 2012-04-21 11:51:23

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,560
Website

Re: Is there a way to remove packages that are installed as dependencies?

Pacman -Qi <gdm package name> will list information including the dependencies.  If you need to pick and chose from this list this is probably the best way.  I don't know why pacman -Rsn <gdm package name> wouldn't work though.  That will remove the package and all of it's dependencies that are not also needed by some other package.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2012-04-21 12:45:59

SS4
Member
From: !Rochford, Essex
Registered: 2010-12-05
Posts: 699

Re: Is there a way to remove packages that are installed as dependencies?

I'd remove gdm and then use pacman -Qdt to list orphans


Rauchen verboten

Offline

#4 2012-04-21 12:50:54

theGunslinger
Member
Registered: 2011-05-20
Posts: 300

Re: Is there a way to remove packages that are installed as dependencies?

sudo pacman -Rscn gdm

Offline

#5 2012-04-21 13:31:05

magicalChicken
Member
From: in the sky
Registered: 2012-03-03
Posts: 73
Website

Re: Is there a way to remove packages that are installed as dependencies?

Be very careful with -Rsc, as this could remove many very important packages it used inapropriatly, I would recommend just pacman -Rs gdm, then check for orphaned packages.

Offline

#6 2012-04-21 13:43:57

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: Is there a way to remove packages that are installed as dependencies?

magicalChicken wrote:

Be very careful with -Rsc, as this could remove many very important packages it used inapropriatly, I would recommend just pacman -Rs gdm, then check for orphaned packages.

+1

I also remove packages with the -Rs switch.  I occasionally check for orphans.  In fact, I wrote an 'orphans' function in in my ~/.bashrc for this purpose.

orphans() {
  if [[ ! -n $(pacman -Qdt) ]]; then
    echo no orphans to remove
  else
    sudo pacman -Rs $(pacman -Qdtq)
  fi
}

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB