List of Installed Packages on Linux
Tracking installed packages on a Linux system is essential for effective management. Whether you need to monitor manually installed packages or dependencies, tools like apt-mark showmanual
simplify this process. In this article, we’ll explore how to use this command to generate a list of installed packages, helping you maintain a clean and well-organized system.
Introduction
Managing a Linux system requires tracking installed packages, including manual installs and dependencies. The apt-mark showmanual
command helps with this task. In this article, we’ll explain how it works and how to use it to list installed packages.
What is apt-mark showmanual
?
The apt-mark showmanual
command is part of the apt-mark
toolset, which allows you to mark and unmark software packages as automatically or manually installed. The showmanual
option lists all packages that were manually installed by the user, giving you an overview of which software was explicitly added to the system.
At this link you can see more details apot apt-mark showmanual.
Why Use apt-mark showmanual
?
There are several reasons why you might want to list manually installed packages on your Ubuntu system:
- System Maintenance: It helps you identify non-essential packages that may no longer be needed, making it easier to clean up unnecessary software.
- Backup and Reinstallation: When moving to a new system or reinstalling Ubuntu, knowing the packages you’ve manually installed is helpful for recreating the same environment.
- Dependency Tracking: Knowing which packages were installed manually versus automatically helps manage dependencies, ensuring that you don’t accidentally remove a package needed by others.
How to Use apt-mark showmanual
Using apt-mark showmanual
is straightforward. Simply open a terminal and run:
apt-mark showmanual
Output is something like:
base-files
bash
bsdutils
dash
diffutils
findutils
grep
grub-pc
gzip
hostname
init
linux-generic
login
ncurses-base
ncurses-bin
openssh-server
ubuntu-minimal
ubuntu-server
ubuntu-server-minimal
ubuntu-standard
util-linux
Filtering the Output
Since the output can be extensive, especially on long-running systems, you may want to filter or redirect the results:
- Filtering for a Specific Package: If you’re looking for a particular package, you can filter the list using
grep
:
apt-mark showmanual | grep package-name
Saving the List to a File: If you want to save the list for future reference, you can redirect the output to a file:
apt-mark showmanual > manual-packages.txt
Removing Manually Installed Packages
If you discover unnecessary packages from the apt-mark showmanual
list, you can easily remove them using apt-get
:
sudo apt-get remove package-name
To further clean up, you can use:
sudo apt-get autoremove
This will remove any packages that were installed automatically but are no longer required by any other packages.
You can visit the following link for more information about removing packages.