7

In an attempt to uninstall wine I ran the command sudo apt-get purge wine* which as you may have guessed removed many of the default packages. I am wondering if there is a way to use the installation disk to reinstall the default packages without overwriting the file system. Not sure if it makes a difference or not, but I am duel booting Windows 8 and Ubuntu 14.04 which was updated from Ubuntu 12.04.

Thanks in advance.

Isaac
  • 2,955
  • 3
  • 14
  • 13

2 Answers2

11

A partial answer is: sudo apt-get install ubuntu-minimal ubuntu-standard ubuntu-desktop

This does not include things like the kernel (e.g. linux-image-generic) and the bootloader (e.g. grub).

Henk Poley
  • 259
  • 2
  • 8
2

From the answer to this question: How to uninstall all but the default Ubuntu packages?:

comm -3 <(cat filesystem.manifest | awk '{print $1}' | sort) <(cat filesystem.manifest-remove | sort) > default.txt
dpkg --get-selections | awk '{print $1}' | sort > current.txt
diff -u default.txt current.txt | grep "^+[^+]" | cut -c 2- > installed.txt
diff -u default.txt current.txt | grep "^-[^-]" | cut -c 2- > uninstalled.txt

That makes 4 files: default.txt is the list of all default packages, current.txt is the list of all current packages, installed.txt is the list of all packages you have added, uninstalled.txt is what you want to look at, it has all the packages that you've removed.

You could then do cat uninstalled.txt | grep wine to list all the uninstalled packages that were related to wine.

Supposedly this could install all packages you've removed, but I wouldn't count on it:

sudo apt-get install ubuntu-desktop

ILoveGit
  • 220
  • 1
  • 7