MandrivaThis Forum is for the discussion of Mandriva (Mandrake) Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When using urpmi, if say you install some packages and it screws something, is there a command for urpmi uninstall the last packages installed and so roll back to your last working setup?
Hmm. well, be nice if it did. I Installed KDE 3.4 via urpmi. All things considered, it went well enough. The only app I cant get running is amarok, which kinda bites. But hey thanks for the fast response.
urpmi is only a wrapper to rpm. any rollback functionality would (i assume) need to be present in the base RPM libraries, and it's just not there at all.
Bleh... wrong answer... in a manner of speaking...
Let's say you want to roll back to KDE 3.2 as packaged with Mandrake 10.1 but don't want to delete all of your other stuff nor re-install....
Ok, the safest way of doing things is to COMPLETELY uninstall KDE...
But you need to make sure you pick up everything... so... log out...
Switch to a text console... then log in as root.
Then...
service dm stop
This kills the display manager.
Make sure all of your RPM/URPMI sources are set up before you proceed... and that you have Internet Connectivity just in case...
Now let's get rid of KDE...
To find the packages you need to uninstall type
rpm -qa | grep kde
Hmm... this produces a nice list, what about automatically uninstalling them...
Sure thing...
rpm -e `rpm -qa | grep kde `
Now it may stop with a message about certain dependant packages.
In this case it may be a good idea to also uninstall them by adding them to the command line...
e.g.
rpm -e `rpm -qa | grep kde ` blah.10.x-mdk.rpm blah2.10.xmdk.rpm
Make note of which additional packages it says are affected.
If they are merely 10.1 packages or those available via the repository you can do this...
rpm -e `rpm -qa | grep kde ` --nodeps
Then remove ANY kde 3.3 or 3.4 sources from URPMI and go to town with
urpmi kde
or better yet switch to your CD/DVD RPM directory and type
urpmi `find . | grep kde`
and let it do it's thing...
Once done
urpmi --auto-select to bring everything back up to par...
You can also pass -e and other options to urpmi, and it appears that it MAY be possible to get it to uninstall EVERYTHING affected but I haven't played around with the parameter passing to be sure.
So YES you can roll back with a little bit of effort.
Cool. I don't think I'm going to go back, but that is exactly what i was after should something go very badly. Thanks for that. Some things are not as I'd like them, but this is apparently KDE 3.4rc1, not a final. I figured I would give it a go and I can sort it out when I upgrade mandrake to 10.2. Got amarok working too, so I'm happy.
that's no rollback. that's just manually erasing packages! to me, roll back is being able to say, "undo the last two packages" or "make it like it was thursday morning".... obviosuly you can remove packages...
No it's not a rollback, but for what I was doing, it would work. That's all I was after really and I appreciate the help. Though, a true rpm rollback capability would be really nice.
Originally posted by acid_kewpie that's no rollback. that's just manually erasing packages! to me, roll back is being able to say, "undo the last two packages" or "make it like it was thursday morning".... obviosuly you can remove packages...
Some people are so contrarian...
rpm --oldpackage
(I forgot the exact syntax...)
when used with urpmi ,as an argument to it you get something that is very very close to true rollback.
... much the same way that rolling back in XP does nothing more than re-install the old drivers and registry entries for those drivers, it's not a true "snapshot"....
True "roll back" would entail re-imaging a drive to a prior snapshot...
Hmm... you CAN do this in Linux if you wanted to, but it's beyond this discussion.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.