I uninstalled several GNOME applications, LibreOffice apps and various other apps. How do I reinstall them all at one without having to reinstall the operating system?
2 Answers
Installing the ubuntu-desktop
package ought to pull the default packages.
sudo apt install ubuntu-desktop
The default set of packages for 18.04 is listed in http://releases.ubuntu.com/18.04/ubuntu-18.04.1-desktop-amd64.manifest (for later releases, just go up to https://releases.ubuntu.com and navigate to the correct release/architecture for your situation).
You can obtain the package names only from this textfile via the following command:
curl http://releases.ubuntu.com/18.04/ubuntu-18.04.1-desktop-amd64.manifest | sed -e 's#\t.*##g'
Therefore, you should be able to install those packages by passing the output of that command to apt install
:
# Ubuntu 18.04.1
sudo apt install $( curl http://releases.ubuntu.com/18.04/ubuntu-18.04.1-desktop-amd64.manifest | sed -e 's#\t.*##g' )
If you're using another version or architecture (arch=amd64 in the above commands), you'll need to modify your command accordingly.
-
I’d recommend the use of
xargs
over command substitution:curl http://releases.ubuntu.com/18.04/ubuntu-18.04.1-desktop-amd64.manifest | sed -e 's#\t.*##g' | xargs sudo apt install
Oct 26, 2018 at 7:16