A collection of scripts designed to help resolve common and specific issues with the APT and DPKG package management system on Debian/Ubuntu-based Linux distributions. These can be useful when encountering errors during apt update, apt upgrade, or when packages are left in a broken or unconfigured state.
-
general-apt-repair(Installed fromgeneral-apt-repair.sh)- Purpose: Runs a standard sequence of commands (
apt update,apt --fix-broken install,dpkg --configure -a,apt upgrade,apt autoremove,apt clean) to attempt fixing common package management problems like broken dependencies or partially configured packages. - When to use: This is usually the first script to try when you encounter general
aptordpkgerrors.
- Purpose: Runs a standard sequence of commands (
-
apt-dpkg-repair(Installed fromrepair_system.sh)- Purpose: A more targeted script designed to fix a specific issue where the
python3package fails to configure due topy3cleanhook errors (often showing "cannot get content of ..." messages for specific packages likedput,gobject-introspection-bin, etc.). It does this by forcing the reinstallation ofpython3and the packages known to cause issues with that specific hook. - When to use: Only use this script if you encounter the specific
python3post-installation configuration errors mentioned above. Using it for unrelated problems is unlikely to help and might perform unnecessary reinstalls.
- Purpose: A more targeted script designed to fix a specific issue where the
- A Debian or Ubuntu-based Linux distribution (e.g., Debian, Ubuntu, Mint, Pop!_OS).
sudoprivileges are required to run the installation and the repair scripts.gitinstalled (to clone this repository).
The included install.sh script will copy the repair scripts to /usr/local/sbin, making them available system-wide when run with sudo.
-
Clone the repository:
git clone https://github.com/1999AZZAR/apt-update-fixer.git apt-update-fixer
-
Navigate into the directory:
cd apt-update-fixer -
Run the installation script:
sudo ./install.sh
The installer will copy the scripts, set appropriate ownership (root:root), and make them executable.
After successful installation, you can run the scripts from any terminal location using sudo:
-
For general APT/DPKG issues:
sudo general-apt-repair
-
For the specific
python3/py3cleanconfiguration error:sudo apt-dpkg-repair
Monitor the output of the scripts carefully for any errors or warnings.
- These scripts execute system commands with
sudoprivileges and directly interact with your system's package manager. - While designed to fix common problems, there's always a risk when modifying system configurations. Incorrect use or unforeseen circumstances could potentially lead to further issues.
- Always ensure you have backups of important data before running system repair tools.
- Understand the difference between the
general-apt-repairand the targetedapt-dpkg-repairscript and use them appropriately.
These scripts are provided "as is" without warranty of any kind. The authors or contributors are not responsible for any damage caused by their use.