Raspbian comes with a lot of stuff pre-installed. There is a lot that I do not use.
Below is a bash script to remove packages that I don't commonly use on headless installs.
While I don't use the desktop, there are times that it comes in handy. So, I keep the desktop and chrome. Both of these could be removed.
Step 1. Open Terminal Window and Login
Step 2. Remove unused packages
Remove unused packages in a headless configuration (i.e., without a monitor). These packages take up space and processing time and are not required.
Download and execute the script
$ cd ~/.
$ wget "https://raw.githubusercontent.com/dumbo25/unsed_rpi/main/unused_rpi.sh"
$ sudo chmod +x unused_rpi.sh
$ sudo bash unused_rpi.sh
$ sudo reboot
Step 3. Remove Desktop [optional]
If running headless, with no intention of ever connecting a monitor or using a desktop then run the commands:
$ wget "https://raw.githubusercontent.com/dumbo25/unsed_rpi/main/desktop.sh"
$ sudo chmod +x unused_rpi.sh
$ sudo bash unused_rpi.sh
$ sudo reboot