Upgrading 16.3 to 17.2 education lite (failing) journey

Hi
I have about 15 machines with zorin 16 which I maintain at a small school.
since the academic year is starting I'm doing some much over due maintenance and found out there was a new os version to upgrade to 17.2 so I proceed to start getting the machines ready, here's what I did

  1. I clear as much space as possible, there are only 2 users a general user and an admin user, the general user are school kids who mostly use the resources offered by a browser and google, but most machines had a cache of 1GB which a cleaned up.
  2. apt update && apt dist-upgrade -y && snap refresh && flatpak upgrade -y
    I found this command in another post to address most of the updating needed
  3. apt autoclean && apt autoremove --purge
    I figure I need to get as much space as needed and quite a few post I checked here and elsewhere point out to this 2 commands as a way to clear up space and remove stuff that is not needed.
  4. software updater
    even though the command in item 2 it's supposed to take of all the updates, when running this in GUI it still shows some stuff to update, wich there was a definite command that could address all the updates from terminal if there's such, feel free to let me know.
  5. once I restarted I got a message that a new version was available. went to the upgrade tool and there it was.. education lite 17.2 available, proceeded with the upgrade.
  6. upgrade took about 2 hours to complete (these rather old computers that I'm not ready to give up on)
  7. out of 7 I worked on, only 2 completed the upgraded ok, the other 5 I got message saying that the upgrade failed, the system was inconsistent and that I reinstall (exact wording may be different but you get the gist of it)
  8. in all the computers in which the upgrade fail there was a notification message that lead to indicate that the problem was space with a message saying 'no space left on device'
  9. even though in a couple of computers I found out I could regain some space with autoclean and autoremove and cleaning up cache, after the first upgrades fail, I was surprised to see the same failed upgrade with the same message on some computers in which I though I had clean up the space as much as I could, yet for some reason the upgrade process never accounted for this to push me to find more ways to deal with the issue prior starting the upgrade.

Fixing the upgrade

to my surprise, even though I got a clear message saying the upgrade failed (wording might be different) and I was getting myself ready mentally to do a reinstall, I started looking into this page: Fix Package Manager Issues - Zorin Help with my hope to fix the install, the reason why I did this is because the system did appear to be now on 17.3

so I issue these commands to try to fix my broken upgrade:

  1. sudo apt clean && sudo apt autoremove
    I wanted to fix my failing and inconsistent system but I knew I needed to get some space back.
  2. sudo dpkg --configure -a
    if any of the commands above would fail, sorin nicely asked me to try to address this with this command.
  3. sudo apt install -f
    this command is supposed to fix dependency issues.
  4. sudo apt autoremove --purge`
    after running 2 and 3 I was able to run this command to regain some valuable space.
  5. apt update && apt dist-upgrade -y && snap refresh && flatpak upgrade -y
    after the previous commands completed any fixes or changes needed with any major concern of anything in particular be broken I issued this command again to ensure I was all good.
  6. then I restarted the machine.

after the restart it does look like I'm on 17.2, no upgrades or updates pending and nothing appears to be failing and nothing to do when doing a simple update && upgrade to check things out and the system seemed stable to me. I'm not sure if this is just my first impression but from the looks of it it seems like I was after all to fix the failed upgrade and ready to give these computers to the kids for this year that just started.

  • any thoughts as to whether this is just wishful thinking? or Is there a way or options to check whether I still need to do a reinstall (I really wish I don't but I'll do it if I really have to)
  • any options to regain more space? I don't mind working on the terminal. If this is something that can be scripted it would be great. these computers are not meant to keep or carry any data year after year, I just need basically a functional machine with a browser at the start of the year and something I can keep patching without much issues, the only think I need to keep in there is veyon
  • getting more space may imply getting rid of windows (these are dual boot systems) but that's something that I will tackle at a later time.

You answered your own question by later using apt dist-upgrade rather than apt upgrade

You would see definite errors if the upgrader had failed again. If everything cleared after your second attempt, I would think it likely you are fine.

Yes. If you are not seeing the home directory filled with clutter from Downloads, Music, configuration files or other media, then most likely a lack of space will take place in Root - specifically, filling up /var/log files. They can really gobble up space.
What you can do - and also can script is a journalctl --vacuum command to occasionally clean out logs. You can set this up either by size or by time frame, so I recommend you determine your needs, first.
I will give two examples:

sudo journalctl --vacuum-time=7d

sudo journalctl --vacuum-size=100M

The first allows the system to retain logs only younger than 7 days. The second, cleans out old logs to keep the maximum size of the directory to be less than 100 megabytes.

You can set these as a script along with sudo apt clean && sudo apt autoremove to run upon every boot,.

2 Likes

dude!!!

thank you for your reply and guidance, I'll start working on those changes as suggested

people like you make this community great, thank again you for your fast response and suggestions!

Cheers!

3 Likes

And its people like you, who make it easy for us to teach. I commend you, and thank you, for following Aravisian's instructions. We are always here to help!


1 Like