1

I removed nautilus from my laptop and I had lost everything. When iam trying to install nautilus it requires some dependencies.
How can I get it now??
I used sudo apt-get remove --purge nautilus to remove nautilus

N0rbert
  • 99,918
  • 2
    Also include the command(s) you used to remove nautilus in the first place. Perhaps you removed more than you intended. – WinEunuuchs2Unix Dec 21 '18 at 00:18
  • On recent ubuntu, sudo apt remove nautilus will remove ubuntu-desktop as well. – Alvin Liang Dec 21 '18 at 03:07
  • It might seem counter-intuitive to follow this duplicate, but you've not only lost nautilus, but your entire desktop system. following the instructions on how to install a GUI will solve your problem. cc @karel – Fabby Dec 21 '18 at 12:01
  • @karel I have just purged nautilus on clean Ubuntu 18.04 LTS and 18.10 VMs - it removed nautilus, nautilus-share and ubuntu-desktop, but system is still usable. Running apt autoremove removes only old kernels, either. So the main problem of this question is lack or details. – N0rbert Dec 21 '18 at 12:12

2 Answers2

3

The Ubuntu desktop system package (ubuntu-desktop) depends on all of the packages in the Ubuntu desktop system. In all currently supported versions of Ubuntu open the terminal and type:

sudo apt install ubuntu-desktop  
sudo reboot  

In order to preview what sudo apt install ubuntu-desktop installs without installing anything run apt show ubuntu-desktop

In order to simulate what sudo apt install ubuntu-desktop installs without installing anything run apt install ubuntu-desktop --simulate

karel
  • 114,770
  • 1
    I somehow managed to remove files or nautilus, whatever the default file manager on Ubuntu 23.04 and thankfully sudo apt install ubuntu-desktop resolved it. Thanks! – StudioLE Aug 11 '23 at 14:02
0

If a package has dependencies that cannot be satisfied you can use aptitude to resolve them:

sudo aptitude install nautilus

This will give you choices on which packages to keep or remove such that nautilus can be installed. There can be many different ways to resolve dependencies and you don't have to accept the first choices given. Keep answering the prompts about which packages you want to keep or remove until the dependencies are resolved.