Need help uninstalling a program/package not from the Software Manager [SOLVED]

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
AvatarMaker
Level 1
Level 1
Posts: 23
Joined: Sun Apr 11, 2021 10:13 pm

Need help uninstalling a program/package not from the Software Manager [SOLVED]

Post by AvatarMaker »

Hello. I am quite new to Linux Mint - coming from Windows. I recently tried installing a program that allowed me to sync my files on Linux Mint 20.1 install with my OneDrive folder. I followed most of the steps in this article:

https://www.fosslinux.com/8835/how-to-s ... -linux.htm

But I stopped at the step with the heading "Configuration" to look at the comments at the bottom of the article. From the comments, I discovered that there were many issues with this program and I tried to uninstall the program using the commands listed under the header "OneDrive Client Uninstallation". But it didn't seem to work for me. I was wondering if any of you would know the steps needed to uninstall this?
Thank you!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
dave0808
Level 5
Level 5
Posts: 987
Joined: Sat May 16, 2015 1:02 pm

Re: Need help uninstalling a program/package not from the Software Manager

Post by dave0808 »

You need to reverse the changes made as listed in that page (somewhat stating the obvious).

Easiest option would be to restore a timeshift backup made before you did all this. Then you would only need to remove the cloned git repo and the built files (assuming your timeshift is doing the default of not backing up your home directory)...

Code: Select all

rm -rf ~/oneDrive
If you don't have timeshift backups, then the next part could be tricky because you've added a repository to your system, and whilst you've "only" installed the packages that you were told to, the update/upgrade may have caused installation of newer packages from their location. What you can do is run Synaptic Package Manager. On the left hand side is a button 'Origin', click on that and it will list all your repositories. You can then select the item in the list that corresponds to https://netcologne.dl.sourceforge.net/project/d-apt/

Hopefully it will only list the packages that you installed and likely some dependencies. These will need to be removed and then the repository needs to be removed. But I don't want to go typing out all of that if you're able to go for the easy option of timeshift :)
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Need help uninstalling a program/package not from the Software Manager

Post by Flemur »

On that page it says:
OneDrive Client Uninstallation

For some reason, if you think the tool is not for you, here are the uninstallation commands that should be entered in the Terminal.

Code: Select all

sudo make uninstall
rm -rf .config/onedrive
To 'make uninstall' you probable have to be in the same directory as when you made it.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
AvatarMaker
Level 1
Level 1
Posts: 23
Joined: Sun Apr 11, 2021 10:13 pm

Re: Need help uninstalling a program/package not from the Software Manager

Post by AvatarMaker »

dave0808 wrote: Mon Apr 12, 2021 7:30 am You need to reverse the changes made as listed in that page (somewhat stating the obvious).

Easiest option would be to restore a timeshift backup made before you did all this. Then you would only need to remove the cloned git repo and the built files (assuming your timeshift is doing the default of not backing up your home directory)...

Code: Select all

rm -rf ~/oneDrive
If you don't have timeshift backups, then the next part could be tricky because you've added a repository to your system, and whilst you've "only" installed the packages that you were told to, the update/upgrade may have caused installation of newer packages from their location. What you can do is run Synaptic Package Manager. On the left hand side is a button 'Origin', click on that and it will list all your repositories. You can then select the item in the list that corresponds to https://netcologne.dl.sourceforge.net/project/d-apt/

Hopefully it will only list the packages that you installed and likely some dependencies. These will need to be removed and then the repository needs to be removed. But I don't want to go typing out all of that if you're able to go for the easy option of timeshift :)
Unfortunately, I did not set up timeshift. So I guess I will have to go with your second suggestion. So when I scroll through the list in 'Origin', the package I am looking for will be called "https://netcologne.dl.sourceforge.net/project/d-apt/"? Or is it something I would find under the tab 'Description'?

Would you mind elaborating on what needs to be done after I find the package? How I would go about removing its dependencies then the package itself?
Thank you so much!

Edit:
Okay I was confused and I realize that the list I am supposed to be scrolling through is under the header 'All'. So I scrolled through that list and I found something called "d-apt/main (netcologne.dl.sourceforge.net)". I attached an image of it in the Synaptic Package Manager.

Does this have anything to do with what I'm looking for? I couldn't find anything within 'Origin' that matches "https://netcologne.dl.sourceforge.net/project/d-apt/".
Attachments
onedrivePackage.png
linux-rox
Level 10
Level 10
Posts: 3334
Joined: Sun Jul 19, 2020 9:17 pm

Re: Need help uninstalling a program/package not from the Software Manager

Post by linux-rox »

As regards the other part of the puzzle, you can remove the repo you added with Software Sources, a system app on Menu.
dave0808
Level 5
Level 5
Posts: 987
Joined: Sat May 16, 2015 1:02 pm

Re: Need help uninstalling a program/package not from the Software Manager

Post by dave0808 »

AvatarMaker wrote: Mon Apr 12, 2021 11:06 am Does this have anything to do with what I'm looking for? I couldn't find anything within 'Origin' that matches "https://netcologne.dl.sourceforge.net/project/d-apt/".
I clearly wasn't explicit enough previously - I just copy/pasted the URL as the basis of what to look for rather than being the exact string within the origin list. I've checked the list of packages on offer from the PPA and it's not all bad news :)

My only slight concern is that your list of "origins" includes multiple entries for netcologne.dl.sourceforge.net which should not be the case, unless you've added something extra.

At this point you might want to take a system backup, just in case any mistakes are made.

However, let's undo what that webpage told you to do. As you got as far as the configuration section, you will have installed the built software but you say that the uninstall didn't work. That's OK, let's look for the installed files..

Code: Select all

sudo find / -name "onedrive*" -print 2>/dev/null
This says to find all entries starting at the top level root folder (referred to as '/'), looking for a name that begins with 'onedrive', and to print out the location of any that are found. The bit on the end simply discards any errors for folders (directories) that can't be accessed.

This may return no results or it may find /bin/onedrive and/or /usr/lib/systemd/user/onedrive.service. The actual paths may be different (for example /usr/bin/onedrive), but those are the "final" paths as determined by the project you downloaded. The chances are that it will also list the folder that the project was downloaded to, this will be in your home directory, so if your username is 'avatar' it may well list /home/avatar/onedrive.

If you're happy that it hasn't found anything that you may have called 'onedrive' (e.g. some document or picture), you can remove the files by extending the find command. This reduces the chances of making any copy/pasting errors...

Code: Select all

sudo find / -name "onedrive*" -print -exec rm -ir {} \; 2>/dev/null
So now the find will show you the location of any file/directory, at that point it will wait for you to press the 'y' key to confirm or 'n' key to avoid removal.

Now remove the packages installed from netcologne.dl.sourceforge.net with the following command. Press 'y' to confirm when prompted if you're happy with the proposed list that you'll be shown...

Code: Select all

sudo apt purge libphobos2* dub dmd-compiler d-apt-keyring
Now we'll remove the repository entry and update the package manager so it notes the change..

Code: Select all

sudo rm /etc/apt/sources.list.d/d-apt.list
sudo apt update
Finally you will be left with the development package versions of the SQLite library and the cURL/OpenSSL library, as well as git. You may or may not need these. If you don't, you can remove them with..

Code: Select all

sudo apt remove libsqlite3-dev libcurl4-openssl-dev git
At that point, it should all be gone.
AvatarMaker
Level 1
Level 1
Posts: 23
Joined: Sun Apr 11, 2021 10:13 pm

Re: Need help uninstalling a program/package not from the Software Manager

Post by AvatarMaker »

dave0808 wrote: Tue Apr 13, 2021 12:33 pm Finally you will be left with the development package versions of the SQLite library and the cURL/OpenSSL library, as well as git. You may or may not need these. If you don't, you can remove them with..

Code: Select all

sudo apt remove libsqlite3-dev libcurl4-openssl-dev git
At that point, it should all be gone.
How can I find out if I do need these after all?
linux-rox
Level 10
Level 10
Posts: 3334
Joined: Sun Jul 19, 2020 9:17 pm

Re: Need help uninstalling a program/package not from the Software Manager

Post by linux-rox »

Two ways come to mind. Doubtless there are others.

1. Before running the command live, do a dry run: apt remove --dry-run <package-names>. Will prompt to confirm removal of packages dependent on the ones you've specified.

As an aside, Mint's version of apt permits but doesn't require sudo (Ubuntu's does). Will prompt for password if elevated privileges are required for a particular task.

2. Check for reverse dependencies in advance with aptitude why <package-name>.
AvatarMaker
Level 1
Level 1
Posts: 23
Joined: Sun Apr 11, 2021 10:13 pm

Re: Need help uninstalling a program/package not from the Software Manager

Post by AvatarMaker »

linux-rox wrote: Tue Apr 13, 2021 8:32 pm Two ways come to mind. Doubtless there are others.

1. Before running the command live, do a dry run: apt remove --dry-run <package-names>. Will prompt to confirm removal of packages dependent on the ones you've specified.

As an aside, Mint's version of apt permits but doesn't require sudo (Ubuntu's does). Will prompt for password if elevated privileges are required for a particular task.

2. Check for reverse dependencies in advance with aptitude why <package-name>.
Okay, so when I ran

Code: Select all

 sudo find / -name "onedrive*" -print 2>/dev/null 
this appeared in the terminal:

/home/matthew/onedrive
/home/matthew/onedrive/onedrive.service
/home/matthew/onedrive/onedrive
/home/matthew/onedrive/onedrive.service.in
/home/matthew/onedrive/onedrive.o
/home/matthew/onedrive/src/onedrive.d


Does this mean that the name of the package I should be looking for the dependencies of is onedrive? Or is it named something else?

Edit:
I tried the command aptitude why onedrive but I got:

Not currently installed
The candidate version 2.3.13-1build2 has priority optional
No dependencies require to install onedrive
AvatarMaker
Level 1
Level 1
Posts: 23
Joined: Sun Apr 11, 2021 10:13 pm

Re: Need help uninstalling a program/package not from the Software Manager

Post by AvatarMaker »

AvatarMaker wrote: Tue Apr 13, 2021 8:49 pm
linux-rox wrote: Tue Apr 13, 2021 8:32 pm Two ways come to mind. Doubtless there are others.

1. Before running the command live, do a dry run: apt remove --dry-run <package-names>. Will prompt to confirm removal of packages dependent on the ones you've specified.

As an aside, Mint's version of apt permits but doesn't require sudo (Ubuntu's does). Will prompt for password if elevated privileges are required for a particular task.

2. Check for reverse dependencies in advance with aptitude why <package-name>.
Okay, so when I ran

Code: Select all

 sudo find / -name "onedrive*" -print 2>/dev/null 
this appeared in the terminal:

/home/matthew/onedrive
/home/matthew/onedrive/onedrive.service
/home/matthew/onedrive/onedrive
/home/matthew/onedrive/onedrive.service.in
/home/matthew/onedrive/onedrive.o
/home/matthew/onedrive/src/onedrive.d


Does this mean that the name of the package I should be looking for the dependencies of is onedrive? Or is it named something else?

Edit:
I tried the command aptitude why onedrive but I got:

Not currently installed
The candidate version 2.3.13-1build2 has priority optional
No dependencies require to install onedrive
Edit again:

Oh! When you said 'Before running the command live' you were referring to the command sudo apt remove libsqlite3-dev libcurl4-openssl-dev git?

If that's the case, then I ran aptitude why libsqlite3-dev libcurl4-openssl-dev git and got this:

i libcurl4-openssl-dev Suggests pkg-config
i pkg-config Depends libdpkg-perl
i libdpkg-perl Suggests git

Are any of these important as far as you guys know?

Also:

I ran the command sudo find / -name "onedrive*" -print -exec rm -ir {} \; 2>/dev/null and it printed:

/home/matthew/onedrive

However, it didn't prompt me at all to type in 'y' but I did anyway. Yet nothing happened.
linux-rox
Level 10
Level 10
Posts: 3334
Joined: Sun Jul 19, 2020 9:17 pm

Re: Need help uninstalling a program/package not from the Software Manager

Post by linux-rox »

AvatarMaker wrote: Tue Apr 13, 2021 8:57 pm Oh! When you said 'Before running the command live' you were referring to the command sudo apt remove libsqlite3-dev libcurl4-openssl-dev git?
Correct. But I meant for you to run aptitude why one package at a time (hence, <package-name>, singular).
And I'm not going to know what packages do off the top of my head. I'd have to research them, same as you.
AvatarMaker
Level 1
Level 1
Posts: 23
Joined: Sun Apr 11, 2021 10:13 pm

Re: Need help uninstalling a program/package not from the Software Manager

Post by AvatarMaker »

linux-rox wrote: Tue Apr 13, 2021 9:57 pm
AvatarMaker wrote: Tue Apr 13, 2021 8:57 pm Oh! When you said 'Before running the command live' you were referring to the command sudo apt remove libsqlite3-dev libcurl4-openssl-dev git?
Correct. But I meant for you to run aptitude why one package at a time (hence, <package-name>, singular).
And I'm not going to know what packages do off the top of my head. I'd have to research them, same as you.
Okay so in regards to a post you made earlier, you mentioned an application called Software Sources where I can find the repository I added and just remove it altogether. Well, I looked in there and I found a repository with the link 'https://netcologne.dl.sourceforge.net/project/d-apt/' that dave0808 mentioned in his first reply.

So would simply removing the repository solve the issue? I know that dave said that the repository could cause other packages to be installed. But would those extra packages be in the repository that I delete?

Here is a screencap of where I found the repository:
Attachments
sourceForge.png
linux-rox
Level 10
Level 10
Posts: 3334
Joined: Sun Jul 19, 2020 9:17 pm

Re: Need help uninstalling a program/package not from the Software Manager

Post by linux-rox »

Removing a repository you no longer want is merely housecleaning. Of itself, doing so doesn't remove any packages. But, yes, you found the right place for removing the repository with Software Sources. FYI, dave gave you a Terminal command for doing the same thing. Either way works.
dave0808
Level 5
Level 5
Posts: 987
Joined: Sat May 16, 2015 1:02 pm

Re: Need help uninstalling a program/package not from the Software Manager

Post by dave0808 »

AvatarMaker wrote: Tue Apr 13, 2021 8:57 pm Also:

I ran the command sudo find / -name "onedrive*" -print -exec rm -ir {} \; 2>/dev/null and it printed:

/home/matthew/onedrive

However, it didn't prompt me at all to type in 'y' but I did anyway. Yet nothing happened.
You need to press the <Enter> key after pressing y. However, given what you have shown (that the only files left are the project files in your home directory), you can simply delete the folder. Either use the GUI file manager and delete as you might expect, or run the following to achieve the same thing..

Code: Select all

cd; rm -r onedrive
As for the remaining packages (SQLite, Git, etc), easiest option is to remove the dev packages as it's extremely unlikely that you need these unless you're a developer working with SQLite database and network connections. Either run the Synaptic Package Manager, search for each package in turn, click on the green square and select "Mark for removal". Do this for both packages, and then click on the "Apply" button in the tool bar. Alternatively run the following command..

Code: Select all

sudo apt remove libsqlite3-dev libcurl4-openssl-dev
The git package has quite a few dependencies, so unpicking those that are no longer necessary would require careful examination of your system. Personally I would either leave it installed, or simply remove 'git' and leave the dependencies alone.

After all of that, you could use sudo apt autoremove to look for any packages that the system believes are not needed and remove them as prompted. Or you can use Synaptic, click on 'Status' from the list of buttons in the bottom left, then click on "Installed (auto removable)" in the list on the upper left. For now though, you can keep things simple and leave them be.

Just to make sure all the onedrive stuff has gone, you can run the find command again, or use the Nemo file manager. Click on 'File System' on the right, then click on the 'search' icon and type in 'onedrive' where prompted.
AvatarMaker
Level 1
Level 1
Posts: 23
Joined: Sun Apr 11, 2021 10:13 pm

Re: Need help uninstalling a program/package not from the Software Manager

Post by AvatarMaker »

dave0808 wrote: Tue Apr 13, 2021 12:33 pm
AvatarMaker wrote: Mon Apr 12, 2021 11:06 am Does this have anything to do with what I'm looking for? I couldn't find anything within 'Origin' that matches "https://netcologne.dl.sourceforge.net/project/d-apt/".
I clearly wasn't explicit enough previously - I just copy/pasted the URL as the basis of what to look for rather than being the exact string within the origin list. I've checked the list of packages on offer from the PPA and it's not all bad news :)

My only slight concern is that your list of "origins" includes multiple entries for netcologne.dl.sourceforge.net which should not be the case, unless you've added something extra.

At this point you might want to take a system backup, just in case any mistakes are made.

However, let's undo what that webpage told you to do. As you got as far as the configuration section, you will have installed the built software but you say that the uninstall didn't work. That's OK, let's look for the installed files..

Code: Select all

sudo find / -name "onedrive*" -print 2>/dev/null
This says to find all entries starting at the top level root folder (referred to as '/'), looking for a name that begins with 'onedrive', and to print out the location of any that are found. The bit on the end simply discards any errors for folders (directories) that can't be accessed.

This may return no results or it may find /bin/onedrive and/or /usr/lib/systemd/user/onedrive.service. The actual paths may be different (for example /usr/bin/onedrive), but those are the "final" paths as determined by the project you downloaded. The chances are that it will also list the folder that the project was downloaded to, this will be in your home directory, so if your username is 'avatar' it may well list /home/avatar/onedrive.

If you're happy that it hasn't found anything that you may have called 'onedrive' (e.g. some document or picture), you can remove the files by extending the find command. This reduces the chances of making any copy/pasting errors...

Code: Select all

sudo find / -name "onedrive*" -print -exec rm -ir {} \; 2>/dev/null
So now the find will show you the location of any file/directory, at that point it will wait for you to press the 'y' key to confirm or 'n' key to avoid removal.

Now remove the packages installed from netcologne.dl.sourceforge.net with the following command. Press 'y' to confirm when prompted if you're happy with the proposed list that you'll be shown...

Code: Select all

sudo apt purge libphobos2* dub dmd-compiler d-apt-keyring
Now we'll remove the repository entry and update the package manager so it notes the change..

Code: Select all

sudo rm /etc/apt/sources.list.d/d-apt.list
sudo apt update
Finally you will be left with the development package versions of the SQLite library and the cURL/OpenSSL library, as well as git. You may or may not need these. If you don't, you can remove them with..

Code: Select all

sudo apt remove libsqlite3-dev libcurl4-openssl-dev git
At that point, it should all be gone.
Okay so I ran all these commands and deleted the 'onedrive' folder in my home directory.
And for the last command, I ran it without the word 'git' at the end.
So I went into the File System and I searched for 'onedrive' and I attached an image of what it found.

I should mention that in an earlier attempt to access my onedrive from my linux mint install, I created a web app that brought me to my Microsoft 365 account online to access my onedrive.
So after finding all of this, I uninstalled the web app, but after doing so all of this in the image showed up after doing the search again.
Attachments
fileSystemSearch.png
linux-rox
Level 10
Level 10
Posts: 3334
Joined: Sun Jul 19, 2020 9:17 pm

Re: Need help uninstalling a program/package not from the Software Manager

Post by linux-rox »

Do I infer correctly that you have now set up Timeshift? I notice those are file references to a snapshot created yesterday. If I'm right, create a snapshot today and delete yesterday's. Do it in that order, so Timeshift doesn't have to rebuild the whole archive.

This isn't necessary, by the way. Yesterday's snapshot will expire in due course without intervention. Having come this far, though, you might as well start with a clear slate. In a month or so, delete the snapshot you create today, as manual snapshots don't expire automatically.
AvatarMaker
Level 1
Level 1
Posts: 23
Joined: Sun Apr 11, 2021 10:13 pm

Re: Need help uninstalling a program/package not from the Software Manager

Post by AvatarMaker »

linux-rox wrote: Wed Apr 14, 2021 3:14 pm Do I infer correctly that you have now set up Timeshift? I notice those are file references to a snapshot created yesterday. If I'm right, create a snapshot today and delete yesterday's. Do it in that order, so Timeshift doesn't have to rebuild the whole archive.

This isn't necessary, by the way. Yesterday's snapshot will expire in due course without intervention. Having come this far, though, you might as well start with a clear slate. In a month or so, delete the snapshot you create today, as manual snapshots don't expire automatically.
You are correct, I created a Timeshift of yesterday per dave's suggestion.
So I created a snapshot of today's and deleted yesterday's.
I once again searched in the directory 'file system' for 'onedrive' and found similar stuff. But I guess it must be the Mint icons for onedrive itself as a web app.

I will attach another image:
Attachments
timeshiftOnedrive.png
linux-rox
Level 10
Level 10
Posts: 3334
Joined: Sun Jul 19, 2020 9:17 pm

Re: Need help uninstalling a program/package not from the Software Manager

Post by linux-rox »

I'm mystified how you have icon files in snapshot which aren't on the system, but it's not worth worrying about. They're not gonna do anything. Heck, they wouldn't/won't do anything even if they were/are still in /usr/share. I'd let this go and recommend you do the same.
AvatarMaker
Level 1
Level 1
Posts: 23
Joined: Sun Apr 11, 2021 10:13 pm

Re: Need help uninstalling a program/package not from the Software Manager

Post by AvatarMaker »

Okay. So then the problem is solved? If that's the case. I'd like to thank you, dave, and everyone else who helped me with this problem.
dave0808
Level 5
Level 5
Posts: 987
Joined: Sat May 16, 2015 1:02 pm

Re: Need help uninstalling a program/package not from the Software Manager

Post by dave0808 »

It looks solved to me, however the question is really whether you are happy with what you have now. If so, feel free to mark the topic as solved for future viewers.
Locked

Return to “Beginner Questions”