From: Juergen Ilse <juergen@ilse.asys-h.de>
To: gentoo-dev@gentoo.org
Subject: [gentoo-dev] little function to delete packages ...
Date: Tue, 5 Feb 2002 15:09:04 +0100 [thread overview]
Message-ID: <20020205150904.A2752@ilse.asys-h.de> (raw)
Hello,
After "rsyncing" und "updating" my system, i wanted to delete old and
unnecessary packages. "ebuild" needs the complete filename of the file
in /var/db/pkg/*/*/*.ebuild to delete the package. I had to type the
full path every time, i wanted to delete an old version of a package ...
So i made a little shell-function (and placed it in roots .bashrc):
delpkg ()
{
_DBPKG_DIR=/var/db/pkg
for f in "$@";
do
case "$f" in
*/*.ebuild)
ebuild ${_DBPKG_DIR}/$f unmerge;;
*.ebuild)
ebuild ${_DBPKG_DIR}/*/$f unmerge;;
*/*)
ebuild ${_DBPKG_DIR}/"${f}"/*.ebuild unmerge;;
*)
ebuild ${_DBPKG_DIR}/*/"${f}"/*.ebuild unmerge;;
esac;
done
}
With this little function, i can simply type something like
delpkg net-ftp/pure-ftpd-1.0.8-r1/pure-ftpd-1.0.8-r1.ebuild
or
delpkg net-ftp/pure-ftpd-1.0.8-r1
or
delpkg pure-ftpd-1.0.8-r1.ebuild
or
delpkg pure-ftpd-1.0.8-r1
I prefer the 2. or 4. form of this command, because i go to /var/db/pkg
and do for example "ls app-admin" and then something like
delpkg <...>
with the via "cut&paste" copied names of the packages to delete (which
i can see in the output of ls) instead of <...>.
Maybe this little function is also useful for someone else ...
ciao,
Juergen Ilse (ilse@asys-h.de)
--
Wenn ich auch nur aus jedem 1000. Bug in einem M$ Produkt|Juergen Ilse
einen Tag trauern wollte, also da muesste ich 300 Jahre |Internet POP Hannover
alt werden und wuerde mehrere Dutzend schwarze Anzuege |Vahrenwalder Str. 205
aufbrauchen. (Detlef Bosau in dcoulm) |30165 Hannover
next reply other threads:[~2002-02-05 14:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-05 14:09 Juergen Ilse [this message]
2002-02-05 14:24 ` [gentoo-dev] little function to delete packages Geert Bevin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020205150904.A2752@ilse.asys-h.de \
--to=juergen@ilse.asys-h.de \
--cc=gentoo-dev@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox