MCPcopy Index your code
hub / github.com/davidfoerster/aptsources-cleanup

github.com/davidfoerster/aptsources-cleanup @v0.1.7.5

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.7.5 ↗ · + Follow
212 symbols 590 edges 24 files 61 documented · 29% updated 23mo agov0.1.7.5.2 · 2021-01-01★ 6832 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Purpose

Detects and interactively deactivates duplicate Apt source entries and deletes sources list files without valid enabled source entries in /etc/sources.list and /etc/sources.list.d/*.list.

Prerequisites

TL;DR: Have a supported Ubuntu or other Debian-based system and install a couple of Python packages:

sudo apt install python3-apt python3-regex

For details see below.

Mandatory

  • Python 3.4+

  • The aptsources module. In Debian-based distribution you can find it in the python3-apt package.

Optional

  • The regex module for improved (non-European) language support. Package name: python3-regex.

Download / Installation

Option 1: Python ZIP application

  1. Download the ZIP application bundle:

  2. Mark it as executable through your file manager or the command-line:

    chmod a+x aptsources-cleanup.pyz
    

Option 2: From source

Alternatively, you can download the source code and run it in Python (albeit without translations).

Usage

  • From a ZIP application bundle:

    sudo ./aptsources-cleanup.pyz
    
  • From source code:

    sudo ./aptsources-cleanup
    

For a (slightly more) detailed description and individual command-line options see the output of

./aptsources-cleanup.pyz --help

or

./aptsources-cleanup --help

depending on the deployment type.

Core symbols most depended-on inside this repo

Shape

Method 124
Function 61
Class 27

Languages

Python100%

Modules by API surface

tools/zip.py51 symbols
src/aptsources_cleanup/util/gettext.py26 symbols
src/aptsources_cleanup/__main__.py19 symbols
src/aptsources_cleanup/util/relations.py17 symbols
src/aptsources_cleanup/util/zipfile.py16 symbols
src/aptsources_cleanup/util/terminal.py13 symbols
src/aptsources_cleanup/util/strings.py12 symbols
src/aptsources_cleanup/util/version/__init__.py10 symbols
src/aptsources_cleanup/util/io.py10 symbols
src/aptsources_cleanup/util/functools.py10 symbols
src/aptsources_cleanup/util/operator.py7 symbols
src/aptsources_cleanup/util/itertools.py6 symbols

For agents

$ claude mcp add aptsources-cleanup \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page