This question gave me the idea that it might be handy to have a list of all packages that are pre-installed on the Raspberry Pi Foundation's Raspbian image.

2 Answers 2


There doesn't seem to be an official list, but it's easy to create one by downloading, extracting and mounting a Raspbian (or any other Debian) image and then following these instructions.

grep -oP '(?<=Package: )\S+' /mnt/raspbian/var/lib/apt/extended_states | sort > /tmp/raspbian-packages.txt

… and out pops a list of 407 packages (for the current version, as of this post, 2014-01-07): http://pastebin.com/8W3i8bms

  • usually, most people are interested in "what packages were pre-installed on MY system", and on a working system your script gives wrong results, because it clearly does not distinguish between pre-installed and manually installed packages.
    – lenik
    May 11, 2014 at 23:33
  • @lenik I understand that that might be of interest too, but it isn't the point of this question. You can take a look at the question I linked to above for instructions on how to get a list of all manually installed packages on a running system.
    – n.st
    May 12, 2014 at 9:20
  • yeah, I saw that. you copy-pasted an answer from another site, and asked a question to fit the answer. good job!
    – lenik
    May 12, 2014 at 10:11
  • @lenik As I said, I needed this list to back up my answer to this question and wanted to share it so others wouldn't have to go through the same steps in case they needed it. I'm sorry if it offends you that I had to look up how to get the list and even had the nerve to cite my sources. (Oh, and I forgot to point out that I didn't invent the positive look-behind regex either…)
    – n.st
    May 12, 2014 at 21:05

when used on real system, the correct list of the automatically installed packages could be found using apt-mark showautomatic and the list of the manually installed packages could be seen using apt-mark showmanual.

for those who don't like a simple solution, but prefers grepping some files, here's another (still correct) approach:

cat /var/lib/apt/extended_states | grep -B 1 "Auto-Installed: 1" | grep "Package" | sed "s/Package: //"|sort > apt_auto-installed_packages.txt

cat /var/lib/apt/extended_states | grep -B 1 "Auto-Installed: 0" | grep "Package" | sed "s/Package: //"|sort > apt_manually-installed_packages.txt

enjoy! =)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.