Maxim Veksler wrote:
> Hi,
>
> I'm preparing my laptop for egdy to feisty upgrade.
>
> My first step is identifying all packages installed on my system
> coming from not official Ubuntu repo. I've started by commenting out
> all of them from sources.list (have ~5 of those), following sudo
> aptitude update. This gave me all "foreign" packages under "Obsolete
> and Locally Created Packages" in aptitude interactive mode. Now I wish
> to continue by resuming the previously commented out repositories, and
> identifying each package from which repository it comes from. This
> will give me a perfect status on required steps to accomplish a
> successful upgrade and more importantly could suggest what software
> will break (because no feisty deb has been created for it yet).
>
> So, to make a long story short - How can I query
> apt-get/aptitude/apt-* for "package from repository" data ?
>
> Thanks guys.
>
Assuming that I understand what you want to do (that is, removing all
the packages that came from an non-official mirror) then the "Packages"
file that comes from any mirror are your friends.
For finding 'em, try:
% ls /var/lib/apt/lists/*Packages
then, detect the file that is related to the mirror that you want to
remove packages coming from it.
Let's use for example Christian Marillat's debian-multimedia.org mirror.
/var/lib/apt/lists/www.debian-multimedia.org_dists_sid_main_binary-i386_Packages
Say that you want to remove all the packages coming from that mirror.
Then, what you should do is:
# apt-get remove --purge `cat
/var/lib/apt/lists/www.debian-multimedia.org_dists_sid_main_binary-i386_Packages
|grep ^Package | awk '{print $2}' |xargs`
I hope that I did get what you wanted to do, and that his would solve
your problem.
best regards,
shay
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]