Skip to content

1999AZZAR/debian_updater

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Debian Upgrade Script: Bookworm to Trixie

A comprehensive set of scripts designed to automate and streamline the upgrade process from Debian 12 "Bookworm" to Debian 13 "Trixie". This project provides a primary upgrade script and a post-upgrade fixer to handle common issues, ensuring a safer and smoother transition.

Features

  • Safety First: Incorporates critical pre-flight checks, including a mandatory data backup confirmation and a disk space check.
  • Third-Party Repository Management: Automatically backs up, disables, and attempts to re-enable and modernize third-party repositories.
  • Source Modernization: Utilizes apt modernize-sources to convert traditional sources.list files to the newer deb822 format.
  • Automated Process: Handles every step of the upgrade, from updating the current system to cleaning up obsolete packages.
  • Logging: Saves a detailed log of the entire upgrade process to /var/log/debian-upgrade-trixie.log for easy troubleshooting.
  • Post-Upgrade Fixer: Includes a separate script (post-update-fixer.sh) to resolve common desktop environment issues after the first reboot.
  • User-Friendly Output: Provides clear, color-coded status messages for each step.

🚨 Critical Warnings

  • BACKUP YOUR DATA: A major OS upgrade is inherently risky. You must have a complete and verified backup of all critical data. The author is not responsible for any data loss.
  • RUN AS ROOT: The scripts require root privileges (sudo) to modify system files and manage packages.
  • STABLE INTERNET CONNECTION: The upgrade will download a large amount of data. A stable internet connection is essential.
  • DO NOT INTERRUPT: Once the upgrade begins, do not interrupt the script. Doing so can leave your system in a broken state.

Prerequisites

  • A system running Debian 12 "Bookworm".
  • Root access (via sudo).
  • A stable internet connection.

Usage

Step 1: Run the Main Upgrade Script

Execute the main updater script with sudo. This script performs the core operating system upgrade.

sudo ./debian-updater.sh

The script will guide you through the following process:

  1. Confirmation: Asks for final confirmation. You must type yes to proceed.
  2. Disk Space Check: Verifies that at least 10GB of free space is available.
  3. System Update: Ensures your current Debian 12 system is fully up-to-date.
  4. Third-Party Repository Backup: Backs up and disables non-Debian source lists.
  5. Source Modernization: Converts /etc/apt/sources.list to the modern deb822 format.
  6. Source Modification: Replaces all instances of bookworm with trixie.
  7. The Main Upgrade: Performs the apt full-upgrade. This is the longest step.
  8. Restore Third-Party Repositories: Restores and attempts to upgrade third-party sources.
  9. Cleanup: Removes obsolete packages with apt autoremove.

After the script completes, you must reboot your system.

sudo reboot

Step 2: Run the Post-Upgrade Fixer

After rebooting into your new Debian 13 system, it is highly recommended to run the post-upgrade fixer script. This script is designed to resolve common issues that can occur with desktop environments and system configuration after a major upgrade.

sudo ./post-update-fixer.sh

This script will:

  • Fix IBus (Input Method) environment variable warnings.
  • Clear caches for KDE Plasma to prevent "Window Switcher is broken" errors.
  • Ensure the latest kernel metapackage is installed and GRUB is correctly configured.

A final reboot after running the fixer is recommended to ensure all changes take effect.

sudo reboot

Step 3: Verify the Upgrade

After the final reboot, you can verify your new system version with:

lsb_release -a

The output should confirm you are running Debian GNU/Linux 13 (trixie).

Troubleshooting

If the upgrade fails, a detailed log file is available at /var/log/debian-upgrade-trixie.log. Review this file to identify the point of failure.

  • APT Errors: If you encounter errors from apt, it may be due to a problematic third-party repository. Check the files in /etc/apt/sources.list.d/ and manually disable any repositories that do not support Debian 13 "Trixie".
  • Broken Packages: If you have broken packages, try running sudo apt --fix-broken install to resolve them.

License

This project is licensed under the MIT License.

About

A comprehensive set of scripts designed to automate and streamline the upgrade process from Debian 12 "Bookworm" to Debian 13 "Trixie". This project provides a primary upgrade script and a post-upgrade fixer to handle common issues, ensuring a safer and smoother transition.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages