$schemamarkup = get_post_meta(get_the_ID(), 'schemamarkup', true); if(!empty($schemamarkup)) { echo $schemamarkup; }

How to Restore Ubuntu Repositories Guide

November 30, 2021 | By the+gnu+linux+evangelist.

GNU/Linux Restoring Ubuntu Repositories Guide

Hi! This tutorial will guide you step-by-step on How to Restore Default Repositories in Ubuntu GNU/Linux Command Line.

And this Ubuntu Repositories Restoring Guide is required in case that by mistake the Repo File has been Overwritten or Deleted.

Featured
  1. 1. Terminal Getting-Started

    How to QuickStart with Command Line on Ubuntu GNU/Linux:

    Console Ubuntu QuickStart Guide
  2. 2. Setting up Apt Repo

    Now to Restore Ubuntu Default Apt Repository
    (For the missing Ubuntu Releases amend the Definition consequently…)
    Edit the Default Ubuntu Repository:

    sudo nano /etc/apt/sources.list
    Copy & Paste the below Repo Code Setup.
    Ctrl+Shift+v to Paste.
    Finally, Ctrl+x to Save & Exit from nano Editor.
    For Ubuntu 22.10:
    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    # newer versions of the distribution.
    deb http://us.archive.ubuntu.com/ubuntu/ kinetic main restricted
    # deb-src http://us.archive.ubuntu.com/ubuntu/ kinetic main restricted
    
    ## Major bug fix updates produced after the final release of the
    ## distribution.
    deb http://us.archive.ubuntu.com/ubuntu/ kinetic-updates main restricted
    # deb-src http://us.archive.ubuntu.com/ubuntu/ kinetic-updates main restricted
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team. Also, please note that software in universe WILL NOT receive any
    ## review or updates from the Ubuntu security team.
    deb http://us.archive.ubuntu.com/ubuntu/ kinetic universe
    # deb-src http://us.archive.ubuntu.com/ubuntu/ kinetic universe
    deb http://us.archive.ubuntu.com/ubuntu/ kinetic-updates universe
    # deb-src http://us.archive.ubuntu.com/ubuntu/ kinetic-updates universe
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team, and may not be under a free licence. Please satisfy yourself as to
    ## your rights to use the software. Also, please note that software in
    ## multiverse WILL NOT receive any review or updates from the Ubuntu
    ## security team.
    deb http://us.archive.ubuntu.com/ubuntu/ kinetic multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ kinetic multiverse
    deb http://us.archive.ubuntu.com/ubuntu/ kinetic-updates multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ kinetic-updates multiverse
    
    ## N.B. software from this repository may not have been tested as
    ## extensively as that contained in the main release, although it includes
    ## newer versions of some applications which may provide useful features.
    ## Also, please note that software in backports WILL NOT receive any review
    ## or updates from the Ubuntu security team.
    deb http://us.archive.ubuntu.com/ubuntu/ kinetic-backports main restricted universe multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ kinetic-backports main restricted universe multiverse
    
    ## Uncomment the following two lines to add software from Canonical's
    ## 'partner' repository.
    ## This software is not part of Ubuntu, but is offered by Canonical and the
    ## respective vendors as a service to Ubuntu users.
    # deb http://archive.canonical.com/ubuntu kinetic partner
    # deb-src http://archive.canonical.com/ubuntu kinetic partner
    
    deb http://security.ubuntu.com/ubuntu kinetic-security main restricted
    # deb-src http://security.ubuntu.com/ubuntu kinetic-security main restricted
    deb http://security.ubuntu.com/ubuntu kinetic-security universe
    # deb-src http://security.ubuntu.com/ubuntu kinetic-security universe
    deb http://security.ubuntu.com/ubuntu kinetic-security multiverse
    # deb-src http://security.ubuntu.com/ubuntu kinetic-security multiverse
    
    # This system was installed using small removable media
    # (e.g. netinst, live or single CD). The matching "deb cdrom"
    # entries were disabled at the end of the installation process.
    
    And so for Ubuntu 22.04:
    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    # newer versions of the distribution.
    deb http://us.archive.ubuntu.com/ubuntu/ jammy main restricted
    # deb-src http://us.archive.ubuntu.com/ubuntu/ jammy main restricted
    
    ## Major bug fix updates produced after the final release of the
    ## distribution.
    deb http://us.archive.ubuntu.com/ubuntu/ jammy-updates main restricted
    # deb-src http://us.archive.ubuntu.com/ubuntu/ jammy-updates main restricted
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team. Also, please note that software in universe WILL NOT receive any
    ## review or updates from the Ubuntu security team.
    deb http://us.archive.ubuntu.com/ubuntu/ jammy universe
    # deb-src http://us.archive.ubuntu.com/ubuntu/ jammy universe
    deb http://us.archive.ubuntu.com/ubuntu/ jammy-updates universe
    # deb-src http://us.archive.ubuntu.com/ubuntu/ jammy-updates universe
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team, and may not be under a free licence. Please satisfy yourself as to
    ## your rights to use the software. Also, please note that software in
    ## multiverse WILL NOT receive any review or updates from the Ubuntu
    ## security team.
    deb http://us.archive.ubuntu.com/ubuntu/ jammy multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ jammy multiverse
    deb http://us.archive.ubuntu.com/ubuntu/ jammy-updates multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ jammy-updates multiverse
    
    ## N.B. software from this repository may not have been tested as
    ## extensively as that contained in the main release, although it includes
    ## newer versions of some applications which may provide useful features.
    ## Also, please note that software in backports WILL NOT receive any review
    ## or updates from the Ubuntu security team.
    deb http://us.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
    
    ## Uncomment the following two lines to add software from Canonical's
    ## 'partner' repository.
    ## This software is not part of Ubuntu, but is offered by Canonical and the
    ## respective vendors as a service to Ubuntu users.
    # deb http://archive.canonical.com/ubuntu jammy partner
    # deb-src http://archive.canonical.com/ubuntu jammy partner
    
    deb http://security.ubuntu.com/ubuntu jammy-security main restricted
    # deb-src http://security.ubuntu.com/ubuntu jammy-security main restricted
    deb http://security.ubuntu.com/ubuntu jammy-security universe
    # deb-src http://security.ubuntu.com/ubuntu jammy-security universe
    deb http://security.ubuntu.com/ubuntu jammy-security multiverse
    # deb-src http://security.ubuntu.com/ubuntu jammy-security multiverse
    
    # This system was installed using small removable media
    # (e.g. netinst, live or single CD). The matching "deb cdrom"
    # entries were disabled at the end of the installation process.
    
    Similarly for Ubuntu 21.10:
    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    # newer versions of the distribution.
    deb http://us.archive.ubuntu.com/ubuntu/ impish main restricted
    # deb-src http://us.archive.ubuntu.com/ubuntu/ impish main restricted
    
    ## Major bug fix updates produced after the final release of the
    ## distribution.
    deb http://us.archive.ubuntu.com/ubuntu/ impish-updates main restricted
    # deb-src http://us.archive.ubuntu.com/ubuntu/ impish-updates main restricted
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team. Also, please note that software in universe WILL NOT receive any
    ## review or updates from the Ubuntu security team.
    deb http://us.archive.ubuntu.com/ubuntu/ impish universe
    # deb-src http://us.archive.ubuntu.com/ubuntu/ impish universe
    deb http://us.archive.ubuntu.com/ubuntu/ impish-updates universe
    # deb-src http://us.archive.ubuntu.com/ubuntu/ impish-updates universe
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team, and may not be under a free licence. Please satisfy yourself as to
    ## your rights to use the software. Also, please note that software in
    ## multiverse WILL NOT receive any review or updates from the Ubuntu
    ## security team.
    deb http://us.archive.ubuntu.com/ubuntu/ impish multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ impish multiverse
    deb http://us.archive.ubuntu.com/ubuntu/ impish-updates multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ impish-updates multiverse
    
    ## N.B. software from this repository may not have been tested as
    ## extensively as that contained in the main release, although it includes
    ## newer versions of some applications which may provide useful features.
    ## Also, please note that software in backports WILL NOT receive any review
    ## or updates from the Ubuntu security team.
    deb http://us.archive.ubuntu.com/ubuntu/ impish-backports main restricted universe multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ impish-backports main restricted universe multiverse
    
    ## Uncomment the following two lines to add software from Canonical's
    ## 'partner' repository.
    ## This software is not part of Ubuntu, but is offered by Canonical and the
    ## respective vendors as a service to Ubuntu users.
    # deb http://archive.canonical.com/ubuntu impish partner
    # deb-src http://archive.canonical.com/ubuntu impish partner
    
    deb http://security.ubuntu.com/ubuntu impish-security main restricted
    # deb-src http://security.ubuntu.com/ubuntu impish-security main restricted
    deb http://security.ubuntu.com/ubuntu impish-security universe
    # deb-src http://security.ubuntu.com/ubuntu impish-security universe
    deb http://security.ubuntu.com/ubuntu impish-security multiverse
    # deb-src http://security.ubuntu.com/ubuntu impish-security multiverse
    
    # This system was installed using small removable media
    # (e.g. netinst, live or single CD). The matching "deb cdrom"
    # entries were disabled at the end of the installation process.
    
    Again for Ubuntu 21.04:
    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    # newer versions of the distribution.
    deb http://us.archive.ubuntu.com/ubuntu/ hirsute main restricted
    # deb-src http://us.archive.ubuntu.com/ubuntu/ hirsute main restricted
    
    ## Major bug fix updates produced after the final release of the
    ## distribution.
    deb http://us.archive.ubuntu.com/ubuntu/ hirsute-updates main restricted
    # deb-src http://us.archive.ubuntu.com/ubuntu/ hirsute-updates main restricted
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team. Also, please note that software in universe WILL NOT receive any
    ## review or updates from the Ubuntu security team.
    deb http://us.archive.ubuntu.com/ubuntu/ hirsute universe
    # deb-src http://us.archive.ubuntu.com/ubuntu/ hirsute universe
    deb http://us.archive.ubuntu.com/ubuntu/ hirsute-updates universe
    # deb-src http://us.archive.ubuntu.com/ubuntu/ hirsute-updates universe
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team, and may not be under a free licence. Please satisfy yourself as to
    ## your rights to use the software. Also, please note that software in
    ## multiverse WILL NOT receive any review or updates from the Ubuntu
    ## security team.
    deb http://us.archive.ubuntu.com/ubuntu/ hirsute multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ hirsute multiverse
    deb http://us.archive.ubuntu.com/ubuntu/ hirsute-updates multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ hirsute-updates multiverse
    
    ## N.B. software from this repository may not have been tested as
    ## extensively as that contained in the main release, although it includes
    ## newer versions of some applications which may provide useful features.
    ## Also, please note that software in backports WILL NOT receive any review
    ## or updates from the Ubuntu security team.
    deb http://us.archive.ubuntu.com/ubuntu/ hirsute-backports main restricted universe multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ hirsute-backports main restricted universe multiverse
    
    ## Uncomment the following two lines to add software from Canonical's
    ## 'partner' repository.
    ## This software is not part of Ubuntu, but is offered by Canonical and the
    ## respective vendors as a service to Ubuntu users.
    # deb http://archive.canonical.com/ubuntu hirsute partner
    # deb-src http://archive.canonical.com/ubuntu hirsute partner
    
    deb http://security.ubuntu.com/ubuntu hirsute-security main restricted
    # deb-src http://security.ubuntu.com/ubuntu hirsute-security main restricted
    deb http://security.ubuntu.com/ubuntu hirsute-security universe
    # deb-src http://security.ubuntu.com/ubuntu hirsute-security universe
    deb http://security.ubuntu.com/ubuntu hirsute-security multiverse
    # deb-src http://security.ubuntu.com/ubuntu hirsute-security multiverse
    
    # This system was installed using small removable media
    # (e.g. netinst, live or single CD). The matching "deb cdrom"
    # entries were disabled at the end of the installation process.
    
    So for Ubuntu 20.04 LTS:
    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    # newer versions of the distribution.
    deb http://us.archive.ubuntu.com/ubuntu/ focal main restricted
    # deb-src http://us.archive.ubuntu.com/ubuntu/ focal main restricted
    
    ## Major bug fix updates produced after the final release of the
    ## distribution.
    deb http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted
    # deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team. Also, please note that software in universe WILL NOT receive any
    ## review or updates from the Ubuntu security team.
    deb http://us.archive.ubuntu.com/ubuntu/ focal universe
    # deb-src http://us.archive.ubuntu.com/ubuntu/ focal universe
    deb http://us.archive.ubuntu.com/ubuntu/ focal-updates universe
    # deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates universe
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team, and may not be under a free licence. Please satisfy yourself as to
    ## your rights to use the software. Also, please note that software in
    ## multiverse WILL NOT receive any review or updates from the Ubuntu
    ## security team.
    deb http://us.archive.ubuntu.com/ubuntu/ focal multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ focal multiverse
    deb http://us.archive.ubuntu.com/ubuntu/ focal-updates multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates multiverse
    
    ## N.B. software from this repository may not have been tested as
    ## extensively as that contained in the main release, although it includes
    ## newer versions of some applications which may provide useful features.
    ## Also, please note that software in backports WILL NOT receive any review
    ## or updates from the Ubuntu security team.
    deb http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
    
    ## Uncomment the following two lines to add software from Canonical's
    ## 'partner' repository.
    ## This software is not part of Ubuntu, but is offered by Canonical and the
    ## respective vendors as a service to Ubuntu users.
    # deb http://archive.canonical.com/ubuntu focal partner
    # deb-src http://archive.canonical.com/ubuntu focal partner
    
    deb http://security.ubuntu.com/ubuntu focal-security main restricted
    # deb-src http://security.ubuntu.com/ubuntu focal-security main restricted
    deb http://security.ubuntu.com/ubuntu focal-security universe
    # deb-src http://security.ubuntu.com/ubuntu focal-security universe
    deb http://security.ubuntu.com/ubuntu focal-security multiverse
    # deb-src http://security.ubuntu.com/ubuntu focal-security multiverse
    
    # This system was installed using small removable media
    # (e.g. netinst, live or single CD). The matching "deb cdrom"
    # entries were disabled at the end of the installation process.
    
    Last, for Ubuntu 18.04 LTS:
    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    # newer versions of the distribution.
    deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
    # deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
    
    ## Major bug fix updates produced after the final release of the
    ## distribution.
    deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
    # deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team. Also, please note that software in universe WILL NOT receive any
    ## review or updates from the Ubuntu security team.
    deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
    # deb-src http://us.archive.ubuntu.com/ubuntu/ bionic universe
    deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
    # deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team, and may not be under a free licence. Please satisfy yourself as to
    ## your rights to use the software. Also, please note that software in
    ## multiverse WILL NOT receive any review or updates from the Ubuntu
    ## security team.
    deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
    deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
    
    ## N.B. software from this repository may not have been tested as
    ## extensively as that contained in the main release, although it includes
    ## newer versions of some applications which may provide useful features.
    ## Also, please note that software in backports WILL NOT receive any review
    ## or updates from the Ubuntu security team.
    deb http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
    
    ## Uncomment the following two lines to add software from Canonical's
    ## 'partner' repository.
    ## This software is not part of Ubuntu, but is offered by Canonical and the
    ## respective vendors as a service to Ubuntu users.
    # deb http://archive.canonical.com/ubuntu bionic partner
    # deb-src http://archive.canonical.com/ubuntu bionic partner
    
    deb http://security.ubuntu.com/ubuntu bionic-security main restricted
    # deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
    deb http://security.ubuntu.com/ubuntu bionic-security universe
    # deb-src http://security.ubuntu.com/ubuntu bionic-security universe
    deb http://security.ubuntu.com/ubuntu bionic-security multiverse
    # deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
    
    # This system was installed using small removable media
    # (e.g. netinst, live or single CD). The matching "deb cdrom"
    # entries were disabled at the end of the installation process.
    

  3. 3. Updating Apt Sources

    Next to Update Ubuntu Repositories
    Just run:

    sudo apt update