I would like to customize Linux Ubuntu or Debian for my raspberry pi. How can I remove packages and Applications from it? And also if possible I would like to know how to change the graphics.  Do i need to download the source code on my workstation and than start developing it or should I do all the necessary changes on a installed Ubuntu?Once I'm finished,how can I create a installation out of it? Or how can I flash my device with an image?
How to scale down Debian
linux;debian;opensource projects
You don't need source code, to install less packages. But if you want something real tiny tiny then you will want to start with a different distro, and add only what you need. Then for that little extra smallness, you would compile from source (optimising for your machine, and size, and disabling features that you do not want), but only when you have selected the software that you need.For the specific answer to your question apt-get autoremove <package-name>. The trick is knowing what to remove. You could start with removing the Windowing System if not needed, it is big (if you choose to do this, then better to start with the server-version).