1

I plan on switching from Desktop to Lite sense I basically only ever use my Pi 4 over SSH. I know how to switch the OS by reimaging the SD card, but it would be much more convenient for me to do it entirely over SSH. So, can I switch from Desktop to Lite over SSH entirely?. I also don't have much a problem with just backing up the user folder, but am I also able to do so while preserving my data? If I can't do the first one then the next best thing would be if all I had to do was make an install USB then connect it to the Pi and do the rest over SSH.

Milliways
  • 59,890
  • 31
  • 101
  • 209
  • I suggest you consider @Milliways answer. The only downside for using the Desktop version is more storage required on the SD card. OTOH, you may find the Lite version doesn't support some features you may wish to use; e.g. bluetooth. – Seamus Feb 17 '21 at 23:55

2 Answers2

1

Use the raspi-config to disable the desktop starting up. Once completed it reboots the machine when it does it you will now be running without the desktop loaded. This is the same as console only version does except it will still have the packages installed to allow you to switch back to a desktop startup. If you wish you can uninstall the desktop packages, this leaves all your data intact as it now is.

https://www.digikey.ca/en/maker/blogs/2018/how-to-boot-to-command-line-and-ssh-on-raspberry-pi

0

It is theoretically possible but would require quite an effort. You are unlikely to find instructions to do so.

The question is WHY?

Other than saving a small amount of space there is no real benefit. Just use raspi-config to boot to the command line and the desktop won't run.

You could copy /home to a lite installation. There will be a few small files which are superfluous.

Milliways
  • 59,890
  • 31
  • 101
  • 209
  • If you boot to the command line the xserver will still run and with a key shortcut you will be able to instantly switch to desktop. That is not a solution. – manarinian Feb 17 '21 at 21:19