Bug 459328

Summary: RFE: provide a way to clean stale/failed preupgrade files, to allow re-running it.
Product: [Fedora] Fedora Reporter: Răzvan Sandu <rsandu2004>
Component: preupgradeAssignee: Seth Vidal <skvidal>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: fedora, marius.stracna, wwoods
Target Milestone: ---Keywords: FutureFeature, Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-03 20:49:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Răzvan Sandu 2008-08-16 15:51:01 UTC
Description of problem:

This was originally reported as bug #444979:

Suppose one completes (partially or totally) the first phase of preupgrade -
until reboot. Than it changes mind and don't want to perform the upgrade. Could
you please explain how to revert system in the old *clean* state (delete all
packages, images and grub entries that preupgrade has created, freeing disk space) ?

  
Actual results:
There is no apparent way of regaining the clean system state if upgrade via preupgrade is interrupted.

Expected results:
Please provide a way (software, documentation) for regaining a clean system state in upgrade is interrupted.


Regards,
Răzvan

Comment 1 seth vidal 2008-11-04 15:47:01 UTC
1. you have to remove the entry from your /etc/grub.conf manually - it should be the first entry

2. go to /var/cache/yum/preupgrade and remove all the files here.

that should be it.

Comment 2 Will Woods 2008-11-04 16:45:44 UTC
preupgrade modifies data in ~3 places:

/var/cache/yum/preupgrade*
/boot/upgrade
/etc/grub.conf

If you want to clean up manually, you can do:

grubby --remove-kernel=/boot/upgrade/vmlinuz
rm -rf /var/cache/yum/preupgrade* /boot/upgrade

In preupgrade-0.9.8 and later, you can restart preupgrade and answer "No" when it asks if you wish to continue your incomplete upgrade. That will clear out the caches in /var/cache/yum/preupgrade-* and /boot/upgrade. You may still need to run grubby (or edit /etc/grub.conf by hand).

Comment 3 Răzvan Sandu 2008-11-05 23:17:44 UTC
Hello,


This is absolutely *great news* , but, IMHO, the following action is needed:

- please add a switch to preupgrade, for automatic cleaning of interrupted upgrades (something like "preupgrade --clean")

- please document clearly this options in some *visible* place, say preupgrade's man page and/or online manual.


Regards,
Răzvan

Comment 4 Yaniv Kaul 2012-12-01 19:43:13 UTC
just encountered it with F17->F18beta.
Cleaned the system using the above methods, it still not cleaned enough - it does not prompt me to again get the files for F18beta.

Re-opening as a RFE.

Comment 5 Will Woods 2012-12-03 20:49:40 UTC
Preupgrade is obsoleted in favor of fedup. It can't possibly work to upgrade to F18 because the F18 installer doesn't support preupgrade - or any kind of upgrade at all. This is handled by fedup now - see bug 874495.

As for cleanup - "fedup-cli --clean" should remove everything that fedup has changed: delete downloaded files, remove symlinks, revert bootloader changes, etc.

If fedup-cli --clean doesn't clean everything, please open a new bug against fedup.