2

I'm trying to see witch packages I've installed, but when I dpkg -l I got a big list of packages and their packages dependencies.

There's a way to get only the list of packages explicitly installed?

Ex:

apt-get install mysql-server

Thats also installs mysql-common

I want that when i list my packages only the mysql-server is showed.

2 Answers2

3

Here is my quick-and-dirty script discussed in the comments to the original post, following the ideas of @Videonauth (as I understood them). The list of the remaining packages is written to the file top_packages.

(It takes some time to run).

#!/bin/bash

echo > dependencies
echo > top_packages
dpkg -l | egrep '^..  ' | cut -f3 -d' ' | cut -f1 -d':' > packages

for i in `cat packages`
do
    echo collecting dependencies of package $i
    apt show $i 2> /dev/null | grep Depends >> dependencies
done

for i in `apt-mark showmanual`
do
    grep -q $i dependencies || echo $i | tee -a top_packages
done
Videonauth
  • 33,815
muclux
  • 5,324
2

This solution helps me:

cat /var/log/apt/history.log | grep 'apt-get install '