Mailinglist Archive: opensuse (2459 mails)

< Previous Next >
Re: [opensuse] Remove packages not available in repositories [SOLVED]
  • From: Sylvester Lykkehus <zly@xxxxxxxxxxxxxx>
  • Date: Wed, 12 Mar 2008 21:44:21 +0100
  • Message-id: <47D840A5.8040502@xxxxxxxxxxxxxx>
On 2008-03-12 13:12, Sylvester Lykkehus wrote:
As the subject states,

I am looking for a way to remove any package that are not available in my added repositories.
This machine was originally a 10.0 install, upgraded to 10.2, upgraded to 10.3.

I know there are still some packages lurking in the system which was installed during 10.0 or 10.2, but now I wish to remove any package that are not available in my added 10.3 repo's.

I also have another 10.2 machine, which has packages from a lot of repo's installed. Now those additional repo's are removed, and I would like to revert to whatever version are available on the official repo's, and remove any packages that are installed, but not available from the official repos.

Any method using rpm/smart/zypper or yast will do.

This was solved by using smart:

Setting local rpm system to a lower priority than the repositories, allows smart to downgrade versions.
See "Several channels provide an identically-named package...."
>smart channel --set rpm-sys priority="-10"
>smart upgrade --update

Next step was to get rid of those packages which were not available on the repositories.
Be careful, this will remove any package which is not available in the repositories, or is available in a different version.
>smart remove $(smart query --show-channels --hide-version --installed | grep "\[rpm-sys\]" | awk '{print $1}' | tr "\n" " ")

Best regards
Sylvester Lykkehus

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >