LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to undo "apt-get -f install" (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-undo-apt-get-f-install-4175624033/)

jon06 02-19-2018 11:16 AM

How to undo "apt-get -f install"
 
Hello,

I was trying to install some software, and there were some problems with dependencies. To solve that, I usually use "apt-get -f install" because it seems to install the dependencies needed. But this time, I ran that command and it says:

The following packages will be REMOVED:
sudo, cinnamon, gksu, etc.

I think that those are important packages, but the apt wants to remove them in order to install their 32 version I think. In addition to this, I found out another way of installing the software I wanted in a more secure way, but the thing is that I don't want the apt trying to remove this anymore.
How can I cancel this? If in the future I need to run "apt-get -f install" again, will I have to accept this removals?

Thanks in advance!

ondoho 02-19-2018 12:17 PM

so did you run the "apt-get -f install" or not?

please show us the output without actually pressing enter at the end, maybe try "apt-get -s -f install" (-s should stand for simulate only).

jon06 02-19-2018 12:48 PM

I run the command and the output is:

sudo apt-get -f install
[sudo] password for lyn:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libportaudio2:i386
The following packages will be REMOVED:
casper cinnamon gdebi gksu guitarpro6:i386 libgksu2-0 lupin-casper mdm
mint-meta-cinnamon mint-meta-core mintdrivers sudo ubuntu-minimal
The following NEW packages will be installed:
libportaudio2:i386
0 upgraded, 1 newly installed, 13 to remove and 17 not upgraded.
1 not fully installed or removed.
Need to get 66,5 kB of archives.
After this operation, 126 MB disk space will be freed.
Do you want to continue? [Y/n] n


And then, I pressed "n" because I think it could be dangerous to delete sudo. I no longer want to run this command, because I know another way of installing the software, so no problems there. But it seems that the next time I try to run "apt-get -f install" I will have to say yes and remove this packages, because they remain there to be deleted. Can I stop it from trying to remove that packages?

Edit:
I ran "apt-get -s -f install" and everything is right now:

sudo apt-get -s -f install
[sudo] password for lyn:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.

And same for "apt-get -f install", so it is solved. I don't know why this is happening but it is solved. Thanks for your time!

ondoho 02-19-2018 12:53 PM

hurm.

no, you don't want to remove sudo.

output of
Code:

uname -rv
sudo apt-get update

please.

jon06 02-19-2018 02:05 PM

As I said, I no longer have the problem, it seems solved. But if you are interested in those outputs for some reason:

Code:

uname -rv
4.4.0-87-generic #110-Ubuntu SMP Tue Jul 18 12:55:35 UTC 2017

sudo apt-get update
[sudo] password for lyn:
Hit:1 https://deb.nodesource.com/node_6.x xenial InRelease
Hit:2 https://download.virtualbox.org/virtualbox/debian xenial InRelease     
Ign:3 https://mega.nz/linux/MEGAsync/xUbuntu_16.04 ./ InRelease               
Hit:4 https://download.sublimetext.com apt/stable/ InRelease                 
Get:5 https://mega.nz/linux/MEGAsync/xUbuntu_16.04 ./ Release [988 B]         
Hit:7 http://ubuntu.cica.es/ubuntu xenial InRelease                           
Hit:8 http://ppa.launchpad.net/gnome-terminator/ppa/ubuntu xenial InRelease   
Ign:9 http://linuxmintpkg.efemef.ovh serena InRelease                         
Get:10 http://ubuntu.cica.es/ubuntu xenial-updates InRelease [102 kB]         
Hit:11 http://packages.microsoft.com/repos/vscode stable InRelease           
Hit:12 http://linuxmintpkg.efemef.ovh serena Release                         
Hit:13 http://ppa.launchpad.net/team-xbmc/ppa/ubuntu xenial InRelease         
Hit:14 http://archive.canonical.com/ubuntu xenial InRelease                   
Get:15 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]   
Hit:17 http://repository.spotify.com stable InRelease                         
Get:18 http://ubuntu.cica.es/ubuntu xenial-backports InRelease [102 kB]       
Hit:19 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease     
Get:20 http://ubuntu.cica.es/ubuntu xenial-updates/main amd64 Packages [724 kB]
Hit:21 http://ppa.launchpad.net/wireshark-dev/stable/ubuntu xenial InRelease 
Get:22 http://ubuntu.cica.es/ubuntu xenial-updates/main i386 Packages [674 kB]
Get:23 http://ubuntu.cica.es/ubuntu xenial-updates/universe amd64 Packages [589 kB]
Get:24 http://ubuntu.cica.es/ubuntu xenial-updates/universe i386 Packages [546 kB]
Fetched 2.840 kB in 5s (483 kB/s)                                             
Reading package lists... Done

I will do a clean installation of the OS because I have a lot of trash as you can see... Hope this helps someone! :D

AwesomeMachine 02-19-2018 04:16 PM

It's worth learning how to do trash cleaning. Bleachbit, cruft, apt-get clean, deborphan, https://raymii.org/s/tutorials/Debia...-commands.html

ondoho 02-19-2018 11:33 PM

Quote:

Originally Posted by jon06 (Post 5821691)
As I said, I no longer have the problem, it seems solved.

as i said?
you edited your previous post after I wrote my reply.
please don't be misleading (i'm sure you didn't do it on purpose).
sometimes it's better to edit an existing post, but usually not anymore after someone replied to it already.

and please mark your thread solved.


All times are GMT -5. The time now is 06:54 AM.