LMDE4 to LMDE5 Upgrade Question

Questions about other topics and general discussion about LMDE
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
mintjim
Level 1
Level 1
Posts: 6
Joined: Tue Jan 25, 2022 2:51 pm

LMDE4 to LMDE5 Upgrade Question

Post by mintjim »

After a successful upgrade I ran into a couple of issues:

1. When I tried to close the Terminal, I got a warning that a process is still running, but nothing seemed to be happening for a long time, and there appeared to be a message that a process had stopped, so I closed the Terminal. This may have been a mistake. There may have been a lot of files and directories left behind when I did this.
2. I opened a new Terminal to run "sudo apt remove mintupgrade" and got a message that "usr/lib/linuxmint/mintupgrade/_pycache_" could not be removed because the directory is not empty. It contains five "pyc" files that I cannot delete.

Other than these to issues the upgrade appears to have been successful. Is there a way to fix this? I did create a Timeshift as suggested by the Upgrade GUI, so I do have that as an option, but the upgrade took over two hours, so that my not be the best option.I am ready to do a fresh install of LMDE5 if that is the best option, because I had very little installed beyound the operating system, although I had created three users (one administrative user and two standard users).
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Fuzzy
Level 4
Level 4
Posts: 251
Joined: Thu Jul 28, 2011 11:54 am

Re: LMDE4 to LMDE5 Upgrade Question

Post by Fuzzy »

Hopefully someone more knowledgeable than I will answer, but in the meantime:

How did you try to close the terminal? (Via the "exit" command, or via the GUI close window control, did you CTRL+C to kill the running process first?)

What commands have you tried using to delete the specified directory?

I have no knowledge of that specific directory - or what the repurcussions of deleting it would be, but the command I'd normally use to delete a non-empty directory would be something along the lines of:

Code: Select all

sudo rm -r Path_To_Directory
(Where Path_To_Directory is your literal path like /usr/lib/linuxmint/mintupgrade/_pycache_ from your example)

Again, I'm not suggesting you do this since I don't know anything about the directory in question, but if deleting the directory is your goal, then perhaps using the recursive flag (-r) might help.

Fuzzy
;^)>>>
mintjim
Level 1
Level 1
Posts: 6
Joined: Tue Jan 25, 2022 2:51 pm

Re: LMDE4 to LMDE5 Upgrade Question

Post by mintjim »

The instructions to upgrade from LMDE4 to LMDE5 included installing the mintupgrade program and running it from Terminal. This launched the gui to perform the upgrade. Then when the upgrade is successfully completed to enter: sudo apt remove mintupgrade followed by sudo reboot. After I received a message that the upgrade was successful in the mintupgrade gui, I closed out the gui. Terminal also said the upgrade was fully successful, but it was not back at the directory prompt. I entered the remove commad in the Terminal. I then entered the reboot command, still nothing that indicated a process was still running, except for the lack of directory prompt. Tried exit, nothing happened. At this point I clicked on the red X to close the Terminal and got a message that a process was still running and would be stopped if I closed the Terminal. Seeing no indication that anything was actually happening, I went ahead and closed the Terminal. I admit I probably should not have done this. I opened a new Terminal session and removed mintugrade (with the message that one directory could not be removed) and entered reboot to complete the process. All indications are that the upgrade was successful.

There are five files (all ending in ".pyc") in the directory that could not be removed. They are apparently flagged read only and I was not able to delete them in order to delete the directory. I had not tried the command you suggested to remove the directory, but will try that.

My big question is: Since there was apparently a process still running after I closed out the mintupgrade gui, and I many have stopped that process, did I leave some files that were in the process of being deleted that are still there, and if so what should I do to fix this?

If someone can confirm that everything was successfully removed and all I need to do is remove the subdirectory by the method you suggested, I will be satisfied. If not, I can try either a Timeshift and run mintupgrade again or do a clean install of LMDE5.
User avatar
axisofevil
Level 4
Level 4
Posts: 388
Joined: Mon Nov 14, 2011 12:22 pm

Re: LMDE4 to LMDE5 Upgrade Question

Post by axisofevil »

I did a sucessful upgrade.
I didn't bother to uninstall mintupgrade.
I have a directory /usr/lib/linuxmint/mintupgrade/__pycache__ which contains 5 tiny files:-
-rw-r--r-- 1 root root 1.7K May 5 14:27 apt_utils.cpython-37.pyc
-rw-r--r-- 1 root root 31K May 5 14:27 checks.cpython-37.pyc
-rw-r--r-- 1 root root 815 May 5 14:27 common.cpython-37.pyc
-rw-r--r-- 1 root root 509 May 5 14:27 constants.cpython-37.pyc
-rw-r--r-- 1 root root 1.9K May 5 14:27 constants_lmde.cpython-37.pyc

Obviously if you want to uninstall mintupgrade or delete this directory, you would use sudo since everything is owned by root.
mintjim
Level 1
Level 1
Posts: 6
Joined: Tue Jan 25, 2022 2:51 pm

Re: LMDE4 to LMDE5 Upgrade Question

Post by mintjim »

I was able delete the directory mintupgrade using sudo, and the upgrade to LMDE5 appears to be completely successful.

My only question now is: Was left anything undone by exiting the Terminal while a process was apparently still running?
User avatar
axisofevil
Level 4
Level 4
Posts: 388
Joined: Mon Nov 14, 2011 12:22 pm

Re: LMDE4 to LMDE5 Upgrade Question

Post by axisofevil »

I would be sure that everything is good, since mintupgrade said it was.

You may have a bunch of unnecessary programs - I did.
It's worth trying sudo apt purge which will give you an option to remove unneeded packages.

You shouldn't normally remove parts of packages by using rm
Either keep the whole package or none of it.
mintjim
Level 1
Level 1
Posts: 6
Joined: Tue Jan 25, 2022 2:51 pm

Re: LMDE4 to LMDE5 Upgrade Question - SOLVED

Post by mintjim »

I think I am going to assume that the Linux Upgrade tool created the mintupgrade directory and that when I deleted that directory I deleted everything that I needed to remove. Unless someone advises me differently I am flagging this inquiry as SOLVED. Before the end of the year I will be doing a clean install on one or two other computers and my compare the resulting directories and files to see if anything should be removed, but that is as far as I will take it. Thanks to everyone for their help.
Locked

Return to “Other Topics & Open Discussion”