Version 1 (modified by james, 9 years ago)
move from snippets page

Simplest transaction you can have (yum 3.2.7 and above):

my = yum.YumBase()
my.install(name='somepackage')
my.remove(name='someotherpackage')
my.resolveDeps()
my.processTransaction()