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.
- 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-sourcesto convert traditionalsources.listfiles 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.logfor 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.
- 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.
- A system running Debian 12 "Bookworm".
- Root access (via
sudo). - A stable internet connection.
Execute the main updater script with sudo. This script performs the core operating system upgrade.
sudo ./debian-updater.shThe script will guide you through the following process:
- Confirmation: Asks for final confirmation. You must type
yesto proceed. - Disk Space Check: Verifies that at least 10GB of free space is available.
- System Update: Ensures your current Debian 12 system is fully up-to-date.
- Third-Party Repository Backup: Backs up and disables non-Debian source lists.
- Source Modernization: Converts
/etc/apt/sources.listto the modern deb822 format. - Source Modification: Replaces all instances of
bookwormwithtrixie. - The Main Upgrade: Performs the
apt full-upgrade. This is the longest step. - Restore Third-Party Repositories: Restores and attempts to upgrade third-party sources.
- Cleanup: Removes obsolete packages with
apt autoremove.
After the script completes, you must reboot your system.
sudo rebootAfter 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.shThis 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 rebootAfter the final reboot, you can verify your new system version with:
lsb_release -aThe output should confirm you are running Debian GNU/Linux 13 (trixie).
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 installto resolve them.
This project is licensed under the MIT License.