def remove_keys(apps, schema_editor):
    """
    We can't import the Post model directly as it may be a newer
    version than this migration expects. We use the historical version.
    """
    Page = apps.get_model('pages', 'Page')
    keys = ['home', 'library', 'category', 'contact_us', 'about_us',
        'my_products', 'download_manager', 'file_manager', 'user_invitation']
    for key in keys:
        try:
            Page.objects.get(english_title=key).delete()
        except Exception:
            pass
