From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1N0yBs-0002su-Ut for garchives@archives.gentoo.org; Thu, 22 Oct 2009 13:58:57 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0EC23E0A92; Thu, 22 Oct 2009 13:58:56 +0000 (UTC) Received: from IMPaqm3.telefonica.net (impaqm3.telefonica.net [213.4.129.23]) by pigeon.gentoo.org (Postfix) with ESMTP id 1EB3DE0A92 for ; Thu, 22 Oct 2009 13:58:54 +0000 (UTC) Received: from IMPmailhost2.adm.correo ([10.20.102.39]) by IMPaqm3.telefonica.net with bizsmtp id vpCC1c00w0r0BT63Ppyj2o; Thu, 22 Oct 2009 15:58:43 +0200 Received: from jesgue.homelinux.org ([78.136.66.163]) by IMPmailhost2.adm.correo with BIZ IMP id vpyJ1c00q3XLmEe1ipyKKG; Thu, 22 Oct 2009 15:58:43 +0200 X-TE-authinfo: authemail="i92guboj.terra.es" |auth_email="i92guboj@terra.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitera01" Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Date: Thu, 22 Oct 2009 15:58:17 +0200 From: =?UTF-8?Q?Jes=C3=BAs_Guerrero?= To: Subject: Re: [gentoo-user] Short cut for unmerging all packages that are not longer in the tree In-Reply-To: <200910221409.31169.alan.mckinnon@gmail.com> References: <4AE06151.8020900@gmx.de> <200910221409.31169.alan.mckinnon@gmail.com> Message-ID: <29ea6c787cd0c0abdcfcc661fbcda029@localhost> X-Sender: i92guboj@terra.es User-Agent: RoundCube Webmail/0.3-stable Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: de9b7b42-5a87-4de4-a85a-72bdab5050d0 X-Archives-Hash: 8c5477317ebaa969dc451e15f1050233 On Thu, 22 Oct 2009 14:09:31 +0200, Alan McKinnon wrote: > On Thursday 22 October 2009 15:42:41 Johannes Kimmel wrote: >> Helmut Jarausch wrote: >> > Hi, >> > >> > is there an easy way to unmerge all packages which are no longer in >> > the current portage tree. >> > (Those make problems on update world) >> > >> > Many thanks for a hint, >> > Helmut. >>=20 >> if packages are not in the portage tree, they should not be pulled in >> anymore. therefore "emerge --depclean" could help. >=20 > depclean only removes packages that it knows for a fact are no longer > needed.=20 > This means >=20 > - not in world > - not linked to by anything > - not depended on by anything >=20 > "not in the tree" is not part of that list. If you have a package in world=20 > that is not in the tree anymore, depclean will leave it as is. It will > remove=20 > ancient mere deps that are somehow still lying around though Yep, if the package is in world, delclean will not help. You could always do it the bash way. I have no idea if there's any tool out there that will make this easier, but it's simple enough to script it= , something like this should work: qlist -I --nocolor | while read pkg; do if [ ! -d "/var/portage/$pkg" ]; then echo "$pkg is not in portage" fi done This will not catch overlays, but it could be easily extended to do so, it's just a generic (and untested) example. It should work I guess. It ju= st dumps the list of installed packages, then tries to find a dir with the same name under your portage directory and if it doesn't exist then the package name is printed. --=20 Jes=C3=BAs Guerrero