Turn your raspbian install into a clean stock debian

Right now, there are no Debian images available and this is a small issue for those who want to use stock debian(not distros based on it) and anyone who builds debian based distros.

A bit ago I saw this Debian 11 Bullseye for Libre Computer Boards - #4 by librecomputer and it’s very much true. Raspbian is pretty much debian just with a Rpi theme and tools, So this got me wondering would it be possible to strip Raspbian of everything that makes it Raspbian and have a stock Debian? Yes, and here’s how you can do that.

1-Uninstall RpiOS tools:
sudo apt autoremove --purge pi-package -y
sudo apt autoremove --purge pi-package-data -y
sudo apt autoremove --purge pi-package-session -y

2-Remove Lxde:
sudo apt-get remove lxappearance lxde lxde-* lxinput lxmenu-data lxpanel lxpolkit lxrandr lxsession* lxsession lxshortcut lxtask lxterminal -y

3-Install a new desktop environment:
sudo apt-get install gnome-core (what i use)
However you may want a far lighter DE like Xfce sudo apt-get install task-xfce-desktop

And that’s about it really, You don’t even need to change /etc/os-release or /etc/issue or even /etc/apt/sources.list