![](https://seccdn.libravatar.org/avatar/9027b8ffafea10c4ecccb29d41295b38.jpg?s=120&d=mm&r=g)
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 http://labix.org/smart/faq "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@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org