0

So was about to install some packages so I could get programs that I want. And somehow one package got broken, I have no idea how. So now when I try to do sudo apt-get -f install it says broken one affects other packages. If I want to remove it, I have to remove a lot of other packages (I think even apt has to be removed) and I don't have any programs on Ubuntu that installed myself.

Is it possible to remove only the broken package or reinstall the uninstalled packages just after they were uninstalled? Remember that I don't have internet access on any Linux computer at my home right now. I am using Lubuntu 13.04.

Results of sudo apt-get check :

enter image description here

karel
  • 122,292
  • 133
  • 301
  • 332

4 Answers4

3

Removing only broken packages was possible through synaptic package manager.

Run the below command on terminal to install and open synaptic,

sudo apt-get install synaptic && sudo synaptic

enter image description here

Right-click on the broken package and then Mark for Complete Removal.After that click apply.

Avinash Raj
  • 80,446
1

To see the broken packages run the following at terminal,

dpkg -l | grep ^rc | awk '{ print $2 }'

After removing the broken packages to install them again, you may wish a make a list. To make a text file broken_packages.txt containing the list of broken packages at your home directory, use

dpkg -l | grep ^rc | awk '{ print $2 }' > ~/broken_packages.txt

To remove the packages,

sudo apt-get purge $(dpkg -l | grep ^rc | awk '{ print $2 }')

Upto this uninstallation you do not need any internet access. But afterwards if you want to install them again you need to have active internet access.

sourav c.
  • 46,120
0

To search and destroy broken packages you can use aptitude:

sudo apt-get install aptitude
aptitude search '~B'

To remove them:

sudo aptitude remove '~B'
Braiam
  • 69,112
-2

try sudo apt-get update and see if it works