I'd like to get a list of packages installed manually by apt or aptitude and be able to find out whether a foobar package was installed manually or automatically. Is there any neat way of doing that from the command line?
|
|
|
|||||||||||||
|
|
The following script will print out all the packages that are not set to automatic install and hence were installed manually:
it is based on how apt-mark prints out the automatically installed packages. |
|||
|
|
In newer versions of the package apt, there is also the apt-mark command
|
|||
|
|
|
As Li Lo said, Now to show the things that are installed manually, it turns out there's a lovely simple search modifier for aptitude. But you don't want to to do that. You want to write a huge bash command that does some rocket science. Note: This is more an illustration of how cool you'll look busting out massive bash commands to all your friends.
I broke it onto two lines for readability. What does this do?
|
|||||||
|
|
If no one gives you a nice answer using a apr-something command you can do it the hard way. Apt-get stores its info in /var/lib/apt/extended_states. Any file that is installed automatically will be added to this file. If you install a package already in this file manually, the package will remain in this file but with Auto-installed: 0 in the second line. It's not deleted. Note: As expected better answers that are likely to work if file placement changes have appeared. I keep mine just in case the info on the file location is useful. |
|||||||
|
|
See this answer on unix.stackexchange.com for a solution that filters out stock packages. |
|||
|
|
I found a great answer to this on a related question. It uses the release manifest for the default package install list. I also found this duplicate question. I would love to see this as a filter in the Ubuntu Software Center. In Windows "Add/Remove Programs" serves this purpose. |
|||
|
|

