How to Add Debian Stretch Repository on Debian Based Systems

December 6, 2019 | By the+gnu+linux+evangelist | Filed in: Tutorial.

Setting Up Repo

  1. 2. Adding Repo

    Then to Add Debian Stretch Repository
    Simply Copy and Execute this Command:

    (And in case of “su: Authentication failure” try instead with “sudo su“)

    su -c "echo 'deb http://ftp.fr.debian.org/debian stretch main' > /etc/apt/sources.list.d/stretch.list"

    Finally, to Enable also the Contrib and Non-free Repos Instead:
    (And in case of “su: Authentication failure” try instead with “sudo su“)

    su -c "echo 'deb http://ftp.fr.debian.org/debian stretch main contrib non-free' > /etc/apt/sources.list.d/stretch.list"

    Possibly Change the Debian Mirror in base of your Location

    Debian Ftp Mirror List

    Finally, Ctrl+x to Save & Exit from nano Editor :)

  2. 3. Pinning Apt

    Then to make Apt Pinning Setup
    And this is Fundamental to Preserve the Stability of the System in Case of Updates/Upgrades!
    So then Edit the Apt Preferences File with:

    sudo nano /etc/preferences

    And for a Debian Stable Based Distro Append:

    Package: *
    Pin: release n=stable
    Pin-Priority: 700
    
    Package: *
    Pin: release n=oldstable
    Pin-Priority: 600
    

    Now you can Freely use both synonyms ‘oldstable‘ or ‘stretch‘ on the Setup.
    The same also in All other cases and so again with ‘stable‘/’buster‘.
    Instead, for a Debian Testing Based Distro:

    Package: *
    Pin: release n=testing
    Pin-Priority: 700
    
    Package: *
    Pin: release n=oldstable
    Pin-Priority: 600
    

    Finally, for Kali Rolling:

    Package: *
    Pin: release n=kali-rolling
    Pin-Priority: 700
    
    Package: *
    Pin: release n=oldstable
    Pin-Priority: 600
    

    Ctrl+Shift+v to Paste in Code.
    And finally, Ctrl+x to Save & Exit from nano.
    Possibly to Find What’s your actual Repo Base use the cat Command like:

    cat /etc/apt/sources.list

    Or again look into the sources Directory to find out eventual others Repos:

    cat /etc/apt/sources.list.d/*.list
  3. 4. Enabling Repo

    Finally, to Re-Load Repositories
    Do:

    sudo apt update
  4. 5. Installing Single Package

    Finally, to Install One Package from Stretch Repo
    Execute:

    sudo apt -t unstable install [MYCOOLPACKAGE]

    So for instance:

    sudo apt -t unstable install libgconfmm-2.6-1v5

Contents


Tags: , , , , , , , , , , , , , ,

QuickChic Theme • Powered by WordPress