Software & AppsOperating SystemLinux

How To List Manually Installed Packages in Ubuntu

Ubuntu 4

In this article, we will delve into the various methods you can use to list manually installed packages in Ubuntu. This can be useful when you are troubleshooting, cleaning up your system, or simply want to know what packages you’ve installed manually.

Quick Answer

To list manually installed packages in Ubuntu, you can use the apt-mark showmanual command in the terminal. Another method is to use the aptitude search '!~M ~i' command to filter out automatically installed packages. You can also use the apt list --manual-installed command to list manually installed packages. Additionally, you can check the package history log using the zgrep 'Commandline: apt' /var/log/apt/history.log command. If you prefer a graphical interface, you can use the Synaptic Package Manager to easily view the list of manually installed packages.

Using apt-mark to List Manually Installed Packages

The apt-mark command is a handy tool that can be used to show manually installed packages. You can use it by running the following command in your terminal:

apt-mark showmanual

This command will display the package names one per line. The showmanual option tells apt-mark to list all packages that were installed manually.

Using aptitude to List Manually Installed Packages

Another method to list manually installed packages is by using the aptitude command. This command is particularly useful if you want to filter out packages that were installed as dependencies (automatically installed). Here’s how to use it:

aptitude search '!~M ~i'

In this command, !~M filters out packages marked as automatically installed and ~i lists the installed packages. So, the command effectively displays the remaining manually installed packages.

Using apt to List Manually Installed Packages

The apt command is also capable of listing manually installed packages. You can use it as follows:

apt list --manual-installed

The --manual-installed option tells apt to list all packages that were installed manually. This command will display the package names along with their versions.

Checking the Package History Log

You can also check the package history log to see the history of apt commands, including the ones used to install packages manually. Use the following command to do so:

zgrep 'Commandline: apt' /var/log/apt/history.log

This command will show the commands used to install packages, which can be useful for identifying manually installed ones.

Using Synaptic Package Manager to List Manually Installed Packages

If you prefer a graphical interface, you can use the Synaptic Package Manager to list manually installed packages. Here’s how:

  1. Open Synaptic Package Manager.
  2. Go to the “Status” section.
  3. Click on “Installed (manual)” to see the list of packages installed manually.

Please note that the methods mentioned above may have slight variations depending on the Ubuntu version and package management tools used.

In conclusion, listing manually installed packages in Ubuntu can be done through various methods, each with its own advantages. Whether you prefer using the terminal or a graphical interface, Ubuntu provides you with the tools to manage your packages effectively.

How can I list manually installed packages in Ubuntu using the terminal?

To list manually installed packages in Ubuntu using the terminal, you can use the apt-mark command with the showmanual option. Simply run apt-mark showmanual in your terminal, and it will display the package names one per line.

Is there a way to filter out packages that were installed as dependencies when listing manually installed packages?

Yes, you can use the aptitude command to filter out packages that were installed as dependencies. Run aptitude search '!~M ~i' in your terminal, and it will display only the remaining manually installed packages.

Can I use the `apt` command to list manually installed packages?

Yes, the apt command can also be used to list manually installed packages. Run apt list --manual-installed in your terminal, and it will display the package names along with their versions.

How can I check the package history log to see the commands used to install packages manually?

You can check the package history log by running zgrep 'Commandline: apt' /var/log/apt/history.log in your terminal. This command will show the commands used to install packages, including the ones used to install packages manually.

Is there a graphical interface option to list manually installed packages?

Yes, you can use the Synaptic Package Manager as a graphical interface to list manually installed packages. Open Synaptic Package Manager, go to the "Status" section, and click on "Installed (manual)" to see the list of packages installed manually.

Leave a Comment

Your email address will not be published. Required fields are marked *