1

I accidentally switched from Ubuntu Desktop 22.04 to Ubuntu Server 22.04. Typing one command without realizing understanding it, I tried to switch to Ubuntu desktop by installing tasksel, but I couldn't update apt.

Ubuntu server image:

Ubuntu server image

The error that i face installing tasksel:

The error that i face installing tasksel

This is my terminal history after my laptop screen became red.

this is my terminal history after my laptop screen became red ...

Nmath
  • 12,105
  • 8
  • 25
  • 54
Licht
  • 21
  • 4
  • The command: `history` may help you recall the command that you issued that is the start of the problem. – chili555 Jan 19 '23 at 21:03
  • You can check my history, I edited my question – Licht Jan 20 '23 at 00:37
  • Does this answer your question? [How do I enable the "Universe" repository?](https://askubuntu.com/questions/148638/how-do-i-enable-the-universe-repository) – karel Jan 20 '23 at 01:23
  • Does this answer your question? [Should I use tasksel, tasks in APT or install regular metapackages?](https://askubuntu.com/q/252056/) – karel Jan 20 '23 at 01:27
  • Finally ifoind out that I have a released life repository... rm.old.releases.ubuntu.com could not be resolved ... for now I have no I idea where this is going – Licht Jan 20 '23 at 01:42
  • 3
    Your output in the pictures shows that the question is misleading. You didn't "accidentally switch" to a different flavor of Ubuntu. You purposefully ran several very-unwise commands that uninstalled your desktop environment. The "`purge python*`" command is particularly troubling -- that's a guaranteed system-killer, and any such instructions are highly suspicious. – user535733 Jan 20 '23 at 07:49

2 Answers2

2

Assuming you want to get back to ubuntu desktop, enter the following command and reboot.

sudo apt install ubuntu-desktop^
Archisman Panigrahi
  • 25,210
  • 17
  • 90
  • 185
  • 1
    What does the `^` caret at the end mean? To use the most recent compatible version? Is that not implied anyways? Or is it something like autocomplete, adapting itself for the Ubuntu-flavor's corresponding desktop environment? – Levente Jan 19 '23 at 21:34
  • 1
    @Levente https://askubuntu.com/questions/211912/whats-the-caret-mean-in-apt-get – Organic Marble Jan 19 '23 at 21:57
  • 1
    @OrganicMarble ah, it means: do a bunch of things. `ubuntu-desktop^` is, in truth, a bunch of things. Thank you. Update: it's detailed at the bottom of this other answer: https://askubuntu.com/a/257172/1157519 – Levente Jan 19 '23 at 22:01
  • +1: For the problem presented, this is a simple, safe, understandable, and highly effective solution. – user535733 Jan 20 '23 at 07:51
1

To switch from Ubuntu Server to Ubuntu Desktop I had to install the ubuntu-desktop package.

That was not acceptable from my repositories.

This was the repositories problem. I added some released life repositories to:

/etc/apt/sources.list

All the links were like:

http://mr.old-releases.ubuntu.com/ubuntu

This resulted in the error :

mr.old-releases.ubuntu.com could not be resolved

I changed mr.old-releases to archive so that the link became like this:

http://archive.ubuntu.com/ubuntu

Then I updated apt:

sudo apt update

Then I installed the ubuntu-desktop package:

sudo apt install ubuntu-desktop
Nmath
  • 12,105
  • 8
  • 25
  • 54
Licht
  • 21
  • 4
  • this is my first time using the platform, thanks for the advice i will try to make it better next time – Licht Jan 20 '23 at 15:36