Перейти к содержимому

Ubuntu как посмотреть установленные пакеты

  • автор:

How to List Installed Packages in Ubuntu 22.04

This tutorial is meant to teach you about ways in which you can list installed packages in Ubuntu 22.04:

  • Using GUI
  • Using dpkg command
  • Using apt command
  • Using snap command
  • Count all installed packages

Method 1: Using GUI to List Installed Packages in Ubuntu 22.04

A simple way to evaluate the installed packages is by using the GUI. In this method, Ubuntu Software Center is utilized for the specified purpose.

To list installed packages in Ubuntu 22.04 using Ubuntu Software, follow the below-given step-by-step instructions.

Step 1: Open Ubuntu Software Center
First of all, go to the “Activities” menu and search for the “Ubuntu Software” application and open it from there:

Step 2: Check Installed Section
Once the Ubuntu Software app is opened, click on the “Installed” tab and you will see a list of all the installed packages:

The above-given image shows a list of all installed packages in our Ubuntu 22.04 system. Now, let’s check out the command-line method of listing the installed packages.

Method 2: Using dpkg to List Installed Packages in Ubuntu 22.04

In Linux, “dpkg” is the command that you can utilize for listing all the installed packages along with version number, architecture, and short package description.

To list installed packages of your Ubuntu 22.04 system, open up the Ubuntu terminal by pressing “CTRL+ALT+T” and execute the following dpkg command:

Output

The command below will count all the installed packages.

Output

Method 3: Using apt to List Installed Packages in Ubuntu 22.04

In this method, we will see how to install packages on our system using apt. “apt” is a packet manager that helps install, update, display, and remove packages on an Ubuntu system. To list down all the packages with the help of the apt command, execute the following command:

Output

The command printed the names of all the packages installed on our system using the apt command and .deb files. It also told us the installed versions and the architecture.

We can also use the grep command along with the apt command to see if a certain package is installed on our system or not:

Example

Output

To see information about a particular package, we can use the show command with apt like this:

Example

Output

Method 4: Using snap to List Installed Packages in Ubuntu 22.04

To list down snap packages, we cannot use apt or dpkg commands. Instead, we use the snap command to display packages installed as snaps on our system.

To print all the packages installed as snap, issue the following command:

Output

Bonus Tip: Count All the Installed Packages on Ubuntu 22.04

If we want to see the exact number of packages installed on our system, we can use the following command:

Output

We have compiled the easiest methods to list installed packages in Ubuntu 22.04.

Conclusion

For the purpose of listing installed packages in Ubuntu 22.04, you can either use the GUI or the command line. In the case of GUI, you can simply go to the Ubuntu Software app and click on the Installed tab to evaluate the list. Meanwhile, you can use the apt, dpkg, or snap command to get a more detailed list of installed packages. This write-up demonstrated the procedure to list installed packages in Ubuntu 22.04 using GUI and command-line.

About the author

Sharqa Hameed

I am a Linux enthusiast, I love to read Every Linux blog on the internet. I hold masters degree in computer science and am passionate about learning and teaching.

Просмотр списка установленных пакетов в Ubuntu

Список установленных пакетов в Ubuntu

Все утилиты, программы и другие библиотеки в операционных системах на базе Linux хранятся в пакетах. Вы скачиваете такую директорию из интернета в одном из доступных форматов, после чего добавляете в локальное хранилище. Иногда может потребоваться просмотреть список всех присутствующих программ и компонентов. Осуществляется поставленная задача разными методами, каждый из которых будет наиболее подходящим для разных юзеров. Далее мы разберем каждый вариант, взяв за пример дистрибутив Ubuntu.

Просматриваем список установленных пакетов в Ubuntu

В Ubuntu присутствует и графический интерфейс, реализованный по умолчанию на оболочке Gnome, а также есть привычный «Терминал», через который осуществляется управление всей системой. Через два этих составляющих доступен просмотр перечня добавленных компонентов. Выбор оптимального способа зависит только от самого пользователя.

Способ 1: Терминал

В первую очередь внимание хотелось бы обратить именно на консоль, поскольку присутствующие в ней стандартные утилиты позволяют задействовать всю функциональность по максимуму. Что же касается отображения списка всех объектов, выполняется это достаточно легко:

Переход к работе с терминалом в Ubuntu

    Откройте меню и запустите «Терминал». Делается это также зажатием горячей клавиши Ctrl + Alt + T.

К сожалению, не всем удобно использовать консоль, а также это не всегда требуется. Именно поэтому следует привести альтернативный вариант отображения списка присутствующих в системе пакетов.

Способ 2: Графический интерфейс

Конечно, графический интерфейс в Ubuntu не позволяет в полной мере проводить те же операции, которые доступны в консоли, однако визуализация кнопок и утилит значительно упрощает выполнение задачи особенно для неопытных юзеров. Сначала советуем обратиться в меню. Здесь присутствует несколько вкладок, а также сортировка на показ всех программ или только популярных. Поиск требуемого пакета может производиться через соответствующую строку.

Нахождение программ через меню в Ubuntu

Менеджер приложений

«Менеджер приложений» позволит более детально изучить поставленный вопрос. Помимо всего, этот инструмент установлен по умолчанию и предоставляет достаточно широкую функциональность. Если по каким-либо причинам «Менеджер приложений» отсутствует в вашей версии Ubuntu, ознакомьтесь с другой нашей статьей, перейдя по следующей ссылке, а мы же переходим к поиску пакетов.

  1. Откройте меню и запустите необходимый инструмент, нажав на его иконку. Запуск менеджера приложений в Ubuntu
  2. Перейдите во вкладку «Установлено», чтобы отсеять тот софт, которого еще не имеется на компьютере. Переход к списку установленных приложений в Ubuntu
  3. Здесь вы видите названия ПО, краткое описание, размер и кнопку, позволяющую провести быстрое удаление. Ознакомиться с приложениями в менеджере Ubuntu
  4. Нажмите на название программы, чтобы перейти на ее страницу в Менеджере. Здесь осуществляется знакомство с возможностями софта, его запуск и деинсталляция. Страница программы в Менеджере приложений Ubuntu

Как видите, работа в «Менеджере приложений» проходит достаточно просто, однако функциональность этого инструмента все еще ограничена, поэтому на помощь придет более расширенный вариант.

Менеджер пакетов Synaptic

Установка дополнительного менеджера пакетов Synaptic позволит получать детальнейшую информацию обо всех добавленных программах и компонентах. Для начала все же придется воспользоваться консолью:

  1. Запустите «Терминал» и введите команду sudo apt-get synaptic для установки Synaptic из официального репозитория. Команда для установки Synaptic в Ubuntu
  2. Укажите свой пароль для рут-доступа. Ввод пароля для установки Synaptic в Ubuntu
  3. Подтвердите добавление новых файлов. Подтвердить добавление пакетов Synaptic в Ubuntu
  4. По завершении инсталляции запустите инструмент через команду sudo synaptic . Запустить Synaptic в Ubuntu
  5. Интерфейс разделен на несколько панелей с различными разделами и фильтрами. Слева выбирайте подходящую категорию, а справа в таблице смотрите все установленные пакеты и подробную информацию о каждом из них. Ознакомиться с интерфейсом программы Synaptic в Ubuntu
  6. Присутствует и функция поиска, позволяющая сразу же отыскать требуемые данные. Поиск пакетов в программе Synaptic U

Ни одним из приведенных методов вам не удастся найти пакет, во время инсталляции которого произошли определенные ошибки, поэтому внимательно следите за появляющимися уведомлениями и всплывающими окнами во время распаковки. Если же все попытки завершились провалом, значит искомый пакет отсутствует в системе или имеет другое наименование. Сверьте название с тем, что указано на официальном сайте, и попробуйте переустановить программу.

How to List Installed Packages on Ubuntu 20.04 in 2023

As a server administrator, understanding how to list software packages installed in an Ubuntu system is crucial. It is useful for various tasks, such as software inventory tracking, updating, and migrating a hosting environment.

There are several commands for Linux server package management. In addition to having different purposes, these commands vary depending on your operating system version and package manager.

In this article, we will explain how to use commands in Ubuntu to list installed packages. We will explore different methods and command variations for different tasks.

How to List Installed Packages on Ubuntu

Let’s go over the common methods to list installed packages on an Ubuntu 20.04 system. Before proceeding, ensure your virtual private server (VPS) is running the same version or the commands won’t work.

How to List Installed Packages on Ubuntu Using apt

Ubuntu version 14.04 and later comes with the apt package management system. In these versions, you can use the apt command-line utility to list the software packages installed on your system.

Use Terminal to execute the Linux commands in a local system. For a remote machine like a VPS, you must connect via SSH using PuTTY or Terminal.

Hostinger VPS hosting users can obtain the login credentials from the VPS overview’s SSH access tab.

Alternatively, Hostinger users can leverage the Browser terminal for command-line package listing directly through their web browser. Once connected, run the following commands to list packages with apt.

Use the apt list command to show all the available Ubuntu 20.04 packages:

To list only installed packages, run the apt list command with the –installed option:

Add the less argument to show a smaller output. To do so, append a pipe (|) and less at the end of your command:

Apt command outputting the shortened list of installed packages

While less compresses your output, it will still list all the installed packages. To check if a package is installed, use the grep command with the software name:

To view more information about a specific package installed on your system, use the apt show command:

Remember to replace the packagename placeholder with the specific package name. For example, run these commands to list Vim-related packages:

To display detailed information about a particular Vim package, run the following:

The apt show command outputting an information about the vim package

How to Use dpkg-query to List Installed Packages on Ubuntu

For older versions of Ubuntu without the apt package manager, use the dpkg-query command. Dpkg-query usage is similar to apt but doesn’t work with a remote repository.

To list only installed packages with their versions and a brief description, run the following command:

Use less with the dpkg command to restrict the output like the following:

The dpkg-query command outputting the shortened list of installed packages

Add grep to search for specific packages. Here’s how the command looks:

Remember to replace packageName with the actual package. For example, enter the following to show installed packages related to PHP:

The dpkg-query command listing installed PHP-related packages

In addition, you can query information about a specific package using dpkg-query. Here’s the command:

How to Create a List of Installed Packages on Ubuntu

In addition to listing installed software, you may need to save the results for archiving or system configuration replication. Ubuntu lets you use the redirect output symbol (>) to store the installed package names into a file.

To do so, use dpkg-query to request information from the dpkg package manager about the installed applications. Then, add -f ‘$\n’ -W to specify the output format.

End the command with the > symbol to inform where it should store the result, namely the completePackage.txt file. Here’s what the complete command looks like:

The list of installed packages in the complatepackage.txt file

Alternatively, use the –get-selections option to retrieve the packages based on their installation status. Here’s the command:

Creating package lists is also helpful for replicating the installed applications on other machines. To do so, move completePackage.txt to the new system and run this command:

The xargs command reads the list from the completePackage.txt file. Then, the Linux software installation command adds the same packages to the new system.

You can also use the apt command for package replication on Linux. To list the installed packages in a file, use the command below:

After adding the file to another server, install the same packages using the apt-get commands:

How to Count the Installed Packages on Ubuntu

You can also count the number of installed Linux packages. The syntax is similar to the one for outputting the list to a file but with a wc or word count command after the pipe.

This command will check the installed packages based on the specified options. In this case, we use the -l option to count the number of lines in your installed package list:

Here’s what the output will look like:

dpkg-query outputs the number of installed packages

For counting installed packages, you can also use the wc command with apt:

How to List Upgradeable Packages

Add the –upgradeable option to your apt command to check the available updates in the repository. Before proceeding, sync the repository using this command:

Then, run the following command for upgradable package detection:

Terminal’s output will be similar to this:

The apt command listing all available package updates

How to List All Package Versions

It’s possible to use the Ubuntu apt commands for package version verification. To do so, run the following:

The list of all package versions in Terminal

To query the installed version of a specific package, add its name at the end of the command. See the screenshot below for an example of the command to query PHP:

The apt command lists all installed PHP package version

Users can also list the LOG files within the /var/log/apt directory path to check what packages have been removed, updated, or deleted. To do so, use the less command:

The package modification history log in Terminal

How to Check Snap and Flatpak Packages

The apt and dpkg-query commands can only list an installed package from their database. To check other packages, like from Linux Snap and Flatpak, change the command accordingly.

For example, use the snap command to list Linux Snap packages installed in your Ubuntu system:

Similarly, use the following command to check the installed flatpak applications:

Conclusion

Linux users should understand how to use the command line to list installed packages before updating and migrating their machines. To do so in an Ubuntu system, use the apt list and dpkg-query commands via Terminal or SSH client.

Add the standard operator into your command to save the package list into a file in your system. You can also add the wc or word count command to count the installed packages.

In addition, use apt list –upgradable to check the available package updates. If you want to list all package versions, replace the option with –all-versions. Remember to replace apt and dpkg if you use another package manager like Flatpak or Snap.

Learn What Else Your Ubuntu Can Do

How to List Installed Packages on Ubuntu FAQ

In this section, we will answer common questions about listing installed packages on an Ubuntu server.

Why List the Installed Packages on Ubuntu?

Users commonly query the installed packages if they want to migrate or replicate a system environment to another machine. In addition, it helps track which packages users must install after formatting their Linux system.

Can I Use These Methods on Linux Distributions Other Than Ubuntu?

It depends on the distributions. For Debian-based distributions, like Kali Linux, these methods should work. However, for other distributions like CentOS and ArchLinux, you need other commands according to your Linux package management system.

Aris is a passionate IT professional and WordPress enthusiast. He loves to share his knowledge and inspire people to start their online journey. When he’s not working or blogging, Aris enjoys watching gadget reviews and scribbling random doodles.

Как вывести список установленных пакетов в Ubuntu

В этом руководстве мы покажем вам, как составить список и отфильтровать установленные пакеты в Ubuntu. Знание того, как составить список установленных пакетов в вашей системе Ubuntu, может быть полезно в ситуациях, когда вам нужно установить те же пакеты на другой компьютер или если вы хотите переустановить свою систему.

Мы также покажем вам, как проверить, установлен ли конкретный пакет, подсчитать установленные пакеты и узнать версию установленного пакета.

Хотя это руководство написано для Ubuntu, те же инструкции применимы для любого дистрибутива на основе Ubuntu, включая Kubuntu, Linux Mint и Elementary OS.

Список установленных пакетов с помощью Apt

apt — это интерфейс командной строки для системы управления пакетами. Он был представлен в Ubuntu 14.04 и сочетает в себе наиболее часто используемые команды из apt-get и apt-cache включая возможность перечисления установленных пакетов.

Чтобы просмотреть список установленных пакетов в вашей системе Ubuntu, используйте следующую команду:

Как видно из выходных данных выше, команда выводит список всех установленных пакетов, включая информацию о версиях пакетов и архитектуре.

Список пакетов длинный, и рекомендуется направить вывод в less чтобы его было легче читать:

Чтобы узнать, установлен ли конкретный пакет, вы можете отфильтровать вывод с помощью команды grep . Например, чтобы узнать, установлен ли в нашей системе пакет screen, мы запустим:

Приведенный выше вывод показывает, что в нашей системе установлена экранная версия 4.6.2-1.

Список установленных пакетов с помощью dpkg-query

Если вы используете более старую версию Ubuntu , вы можете использовать команду dpkg-query для вывода списка пакетов:

Команда покажет вам список всех установленных пакетов, включая версии пакетов, архитектуру и краткое описание.

Вы можете отфильтровать вывод dpkg-query -l с помощью grep же, как вывод apt :

Создайте список всех установленных пакетов

Чтобы создать список имен всех установленных пакетов в вашей системе Ubuntu или Debian и сохранить его в файле с именем packages_list.txt , выполните следующую команду:

Теперь, когда у вас есть список, если вы хотите установить те же пакеты на свой новый сервер, вы можете сделать это с помощью:

Подсчитайте количество пакетов, установленных на вашем компьютере с Ubuntu

Чтобы узнать, сколько пакетов установлено в вашей системе, вы можете использовать ту же команду, что и раньше, но вместо перенаправления вывода в файл вы можете перенаправить его в утилиту wc и подсчитать строки:

Как видите, на моем сервере Ubuntu установлено 544 пакета.

Выводы

К настоящему времени вы должны знать, как составлять список и фильтровать установленные пакеты в вашей системе Ubuntu. Если вы хотите узнать больше о команде apt откройте терминал и введите man apt .

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *