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,333
Licht
  • 21

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
  • 28,338
  • 18
  • 105
  • 212
  • 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,333
Licht
  • 21
  • 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