typed apt-get -f, and it deleted most of my system. How do I get back into gnome and a usable system from the command prompt.

Asked by Joshua D Simon

When trying to upgrade my distribution of Ubuntu, I typed in apt-get -f to resolve dependences. Unfortunately it deleted most of my system, making it usable from the command line only. I need to be able to install gnome and everything that goes with it from the command line so I don't lose any files. A step by step answer to my question would be much appreciated.

Thank You
Joshua S.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

sudo apt-get update; sudo apt-get --reinstall install ubuntu-desktop

Should do it

Revision history for this message
Joshua D Simon (jdsimon) said :
#2

computer said E:Broken Packages

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#3

try:

sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sudo rm -rf /var/lib/dpkg/updates/*; sudo rm -rf /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists; sudo mkdir /var/lib/apt/lists/partial
sudo apt-get clean; sudo apt-get autoclean
sudo apt-get update
sudo dpkg --clear-avail
sudo dpkg --configure -a
sudo apt-get install -f
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install ubuntu-desktop

Revision history for this message
Joshua D Simon (jdsimon) said :
#4

after typing in: sudo apt-get install ubuntu-desktop, computer says: E:Broken packages

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#5

All other rows of my previous answer are working fine....?

Revision history for this message
Joshua D Simon (jdsimon) said :
#6

Marco Braida:

After typing in sudo apt-get dist-upgrade, computer said 0 packages upgraded 0 packages installed 0 packages deleted
then typing in sudo apt-get install ubuntu-desktop, computer said E:Broken packages
All other rows worked fine:

Can you help with this problem?

Provide an answer of your own, or ask Joshua D Simon for more information if necessary.

To post a message you must log in.