Purpose of this script
This is a little helper script for Kubuntu™ users who have gotten rid of and blocked Snap entirely (like Linux Mint does) and now want to release-upgrade to the next main Kubuntu™ version (e.g. from 22.04 LTS to 22.10).
It has been tested many times with Kubuntu™ 20.04, 22.04, 22.10 and 23.04.
I hope you find the script useful! Yours respectfully, Schwarzer Kater
Installation and usage of this script
Important
This script SHOULD be run before release-upgrading Kubuntu™ to the next main version if you have removed and blocked Snap entirely before, OR ELSE A RELEASE-UPGRADE TO THE NEXT KUBUNTU™ VERSION WILL PROBABLY FAIL!
A full upgrade of the system (either with Discover or in Konsole with sudo apt update && sudo apt full-upgrade) AND a reboot is strongly recommended prior to running this script.
It has been designed to be run in combination with the get_rid_of_Snap script.
It WILL ALSO REMOVE Firefox if that has been installed from the Mozilla Team PPA before (your Firefox user data is left entirely untouched) - but the get_rid_of_Snap script will then reinstall both the Mozilla Team PPA and Firefox from there when run again after the release-upgrade to the next main Kubuntu™ version.
You will be asked for confirmation twice before the removal of relevant APT pinning and the reinstallation of snapd is started - and if you answer "n" or "N" no changes at all are made to your system.
For some more information about what is done in detail see the comments within the script itself.
Known bugs / issues
Roadmap
Other Ubuntu™-based distributions
No other Ubuntu™-based distributions/Flavors but Kubuntu™ are officially supported.
In its current state my script does not work with Ubuntu™ (Gnome) or other GTK/Gnome based Flavors like Xubuntu™, Ubuntu MATE™, etc. as they use the Snap Store or the Gnome Software Center instead of Discover - to name just one example.
Due to the amount of time it would take to change and test this script accordingly I will probably also not support them in the future.
But by all means feel free to use my script as a template to do so.
That said the script does work with Lubuntu™ and Ubuntu Studio™ (KDE Plasma) so far.
This is a little helper script for Kubuntu™ users who have gotten rid of and blocked Snap entirely (like Linux Mint does) and now want to release-upgrade to the next main Kubuntu™ version (e.g. from 22.04 LTS to 22.10).
It has been tested many times with Kubuntu™ 20.04, 22.04, 22.10 and 23.04.
I hope you find the script useful! Yours respectfully, Schwarzer Kater
Installation and usage of this script
- You can download the script from here: https://gitlab.com/scripts94/kubuntu...elease-upgrade
Click on its name in the file list and on the next page use the download button on the far right side of the script name.
OR
Copy and paste the code of the script into a blank Kate text editor document and save it as "Kubuntu_reinstall_Snap_for_release-upgrade.sh" to e.g. your home directory. - Make the file Kubuntu_reinstall_Snap_for_release-upgrade.sh executable in the Dolphin file manager:
go to the directory you downloaded/saved the script to, right-click on the file and choose Properties -> Permissions -> enable Is executable -> choose OK.
OR
Make the file Kubuntu_reinstall_Snap_for_release-upgrade.sh executable in the Konsole terminal emulator:
go to the directory you downloaded/saved the script to (cd [path to]/[name of directory], e.g. cd ~/Downloads) and enter:
chmod +x Kubuntu_reinstall_Snap_for_release-upgrade.sh. - To run the script in the Konsole terminal emulator go to the directory you downloaded/saved the script to and enter:
./Kubuntu_reinstall_Snap_for_release-upgrade.sh.
Important
This script SHOULD be run before release-upgrading Kubuntu™ to the next main version if you have removed and blocked Snap entirely before, OR ELSE A RELEASE-UPGRADE TO THE NEXT KUBUNTU™ VERSION WILL PROBABLY FAIL!
A full upgrade of the system (either with Discover or in Konsole with sudo apt update && sudo apt full-upgrade) AND a reboot is strongly recommended prior to running this script.
It has been designed to be run in combination with the get_rid_of_Snap script.
It WILL ALSO REMOVE Firefox if that has been installed from the Mozilla Team PPA before (your Firefox user data is left entirely untouched) - but the get_rid_of_Snap script will then reinstall both the Mozilla Team PPA and Firefox from there when run again after the release-upgrade to the next main Kubuntu™ version.
You will be asked for confirmation twice before the removal of relevant APT pinning and the reinstallation of snapd is started - and if you answer "n" or "N" no changes at all are made to your system.
For some more information about what is done in detail see the comments within the script itself.
Known bugs / issues
- If you had enabled the Mozilla Team PPA prior to running this reinstall_Snap_for_release-upgrade script, you might get update messages regarding Thunderbird and/or because of the "dummy" Firefox APT packages from Ubuntu's™ repositories afterwards as this script removes the Mozilla Team PPA for the release-upgrade.
The solution is that you will have to install these ("dummy") packages like the system package management suggests or you will not be able to release-upgrade your Kubuntu™ to the next main version.
Roadmap
- To do: write a proper FAQ.
Other Ubuntu™-based distributions
No other Ubuntu™-based distributions/Flavors but Kubuntu™ are officially supported.
In its current state my script does not work with Ubuntu™ (Gnome) or other GTK/Gnome based Flavors like Xubuntu™, Ubuntu MATE™, etc. as they use the Snap Store or the Gnome Software Center instead of Discover - to name just one example.
Due to the amount of time it would take to change and test this script accordingly I will probably also not support them in the future.
But by all means feel free to use my script as a template to do so.
That said the script does work with Lubuntu™ and Ubuntu Studio™ (KDE Plasma) so far.
Comment