GithubHelp home page GithubHelp logo

gr360ry / apt-select Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jblakeman/apt-select

0.0 2.0 0.0 710 KB

Choose a fast, up to date Ubuntu apt mirror

License: MIT License

Python 89.34% Shell 10.66%

apt-select's Introduction

apt-select

Select a fast, up to date Ubuntu apt mirror using flexible filters.

Features

  • Tests latency to mirrors in mirrors.txt.

    • Each mirror is sent 3 TCP connection requests (on port 80) to gauge round trip time.
  • Prints latency, status, and bandwidth capacity of the fastest mirrors in a ranked list.

    • Minimum round trip times determine rank.
    • Status and bandwidth are scraped from launchpad.
  • Generates sources.list file using new mirror.

    • New mirror can either be chosen from a list or generated automatically (default).
    • Selected mirror is used to search /etc/apt/sources.list and replace all instances of the first urls labeled as the main/security repositories.

Dependencies

Python HTML parser, BeautifulSoup

sudo apt-get install 'python(3?)-bs4$'

Usage

List arguments and options:

./apt-select.py -h

Choose from the top 5 mirrors, including those last updated a week ago:

./apt-select.py -c -t 3 -m one-week-behind

Find the top 10 mirrors, output latency info only, and don't generate new config file:

./apt-select.py -t 10 -p -l

After new sources.list is generated in current working directory, backup and replace to update apt:

sudo mv /etc/apt/sources.list /etc/apt/sources.list.backup && \
sudo mv sources.list /etc/apt/

Supported URI Types

Currently, http and ftp are supported.

/etc/apt/sources.list should contain sources in the following format:

[deb|deb-src] [http|ftp]://mirror.example.com/path [component1] [component2] [...]

apt-select's People

Contributors

jblakeman avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.