- How do I see what packages are installed on Ubuntu Linux?
- How do I see what packages are installed on Ubuntu Linux?
- apt list installed packages
- List all installed packages only
- How to list or find out if a specific package installed or not
- Ubuntu list installed packages
- Listing installed packages sorted by installation date and time
- Conclusion
- How can i find the location of installed software in linux?
- 3 Answers 3
- How to check a list of packages installed on Linux
- 1) How to List All Packages Installed on RPM Based Systems Using the RPM Command
- 2) How to Check All Packages Installed on RHEL (Red Hat) and CentOS Systems Using the YUM Command
- 3) How to Verify All Packages Installed on RHEL (Red Hat), CentOS and Fedora Systems Using the DNF Command
- 4) How to Find All Packages Installed on SUSE and openSUSE Systems Using the Zypper Command
- 5) How to Check All Packages Installed on Arch Linux Based Systems Using the Pacman Command
- 6) How to List All Packages Installed on Deb Based Systems Using the DPKG Command
- 7) How to Find All Packages Installed on Deb Based Systems Using the Apt Command
- 8) How to Calculate the List of Packages Installed on Your System
- 9) How to Export a List of Installed Packages to a File in Linux
- Ubuntu Documentation
- Introduction
- Installation
- Usage
- Use CheckInstall with auto-apt
- Ubuntu Documentation
- Introduction
- Packages and Package Management
- What is a package?
- Source or Binary?
- Package Dependencies
- Package Managers
- Software Channels/Repositories
- Installing a Package
- Via your web browser
- Via a basic graphical method
- for Ubuntu: «Sofware Centre «
- for Kubuntu : «Add/Remove Programs»
- Via an advanced graphical method
- for Ubuntu/Xubuntu/Edubuntu : Synaptic
- Via a Text Based Methods
- Aptitude — the text-based method
- apt-get — the technical method
- Installing downloaded packages
- Using GDebi to install packages
- Using dpkg to install packages
- Getting a list of recently installed packages
- Automatic updates: Update Manager
- Installing packages without an Internet connection
- Use Keryx
- Use the Synaptic package download script
- Use Offline apt-get update
- Use apt-offline
How do I see what packages are installed on Ubuntu Linux?
I am a new Ubuntu Linux server user. My server hosted at Google cloud VM. How do I see what packages are installed on Ubuntu Linux?
Introduction: Ubuntu Linux is an open source operating system based upon the Linux kernel and GNU command line utilities. Ubuntu Linux is extremely popular among new Linux users as well as developers all around the globe. This page shows how to list all installed packages with apt command or apt-get command on Ubuntu Linux.
Tutorial details | |
---|---|
Difficulty level | Easy |
Root privileges | Yes |
Requirements | Debian or Ubuntu Linux |
Est. reading time | 5 minutes |
You need to use the apt or apt-get or dpkg command to list all installed packages on an Ubuntu Linux server from the bash shell prompt.
How do I see what packages are installed on Ubuntu Linux?
The procedure to list what packages are installed on Ubuntu:
- Open the terminal application or log in to the remote server using ssh (e.g. ssh user @ sever-name )
- Run command apt list —installed to list all installed packages on Ubuntu
- To display a list of packages satisfying certain criteria such as show matching apache2 packages, run apt list apache
Let us see some examples about how to list installed packages on Ubuntu and Debian Linux operating systems.
apt list installed packages
Let us list all software packages on Ubuntu Linux available for us:
$ apt list
You might want to use the grep command/egrep command to filter out:
$ apt list | grep nginx
OR
$ apt list | more
However, you may see message on screen that read as follows:
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
To avoid this message use the dpkg command as follows:
$ dpkg —list | grep nginx
$ dpkg —list | more
List all installed packages only
The apt command displays both installed and packages available to install. What if you want to list currently installed software only? Fear not, pass the option to the apt command:
$ apt list —installed
- No ads and tracking
- In-depth guides for developers and sysadmins at Opensourceflare✨
- Join my Patreon to support independent content creators and start reading latest guides:
- How to set up Redis sentinel cluster on Ubuntu or Debian Linux
- How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
- How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
- A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
- How to protect Linux against rogue USB devices using USBGuard
Join Patreon ➔
How to list or find out if a specific package installed or not
Run package policy as follows:
$ apt list -a pkgNameHere
Is sudo package installed?
$ apt list -a sudo
Is sudo package mariadb-server?
$ apt list -a mariadb-server
Ubuntu list installed packages
It is also possible to list installed packages matching given pattern. The syntax is:
dpkg -l pattern
dpkg —list pattern
apt list pattern
apt list —installed pattern
For example:
dpkg —list ‘x*’
Sample outputs:
- ii – Indicates that package named xauth installed.
- un – Indicates that package not installed or in Unknown status.
Listing installed packages sorted by installation date and time
There is no simple command, but we can use the combination of zgrep and other commands as follows. Let us count it:
Total installed packages on nixcraft-wks01 : 6433
List them:
zgrep » installed » /var/log/dpkg.log*
Please note that zgrep will search possibly compressed files for a regular expression as those log files are compressed by system. Hence, we need to use various z commands on Linux. See “How to find out when Debian or Ubuntu package installed or updated” for more info.
Conclusion
You learned how to list both installed and uninstalled packages on an Ubuntu Linux server or desktop using the CLI method. See the following man pages using the man command:
man apt
man apt-get
man dpkg
🐧 Get the latest tutorials on Linux, Open Source & DevOps via
Источник
How can i find the location of installed software in linux?
Is there any command that I can use in the console to know the location of installed software in linux?
i have copied a xyz.bin from windows machine to linuxdesktop and installed it.
more over can you please tell me how to uninstall a software which is installed in linux
Thanks in advance
3 Answers 3
You may want to use
to find the path where the binary is linked to.
Other application specific files may reside in
The way a package is installed/uninstalled on Linux depends on either the specific Linux distribution AND the specific package.
Since you have used a .bin file for installation, it is likely that you have an uninstall command specific for your program in the path.
If you provide more information about the package and the Linux distribution, we can give more help.
It depends on the distribution you’re using. Supposing you are using a debian\ubuntu distribution, you can uninstall it by the apt command, using sudo apt-get remove software_name sudo apt-get purge software_name
Of course you need to have root privileges.
The softwares are usually installed in bin folders, in /usr/bin, /home/user/bin and many other places, a nice starting point could be the find command to find the executable name, but it’s usually not a single folder. The software could have components and dependencies in lib,bin and other folders.
Источник
How to check a list of packages installed on Linux
As we know, package managers are one of the most contributors to the Linux system.
Most of us prefer the command line interface for package management such as the YUM command, DNF command, APT command, Apt-Get command, PACMAN command, and ZYPPER command based on Linux distributions.
Package Manager allows us to perform actions such as installing new software packages, removing unused software packages, updating the existing software packages, searching for specific software packages, and updating the system to latest available version, etc.
As a system administrator you should keep track of the packages installed on the system, which can save you a lot of time when setting up a new server or migrating them.
Since we already have the list, this list will help you to quickly install the required packages.
Many tools are used to manage packages on Linux, from the graphics or text-based interface to the lower-level tools used to install packages.
This is a very short and powerful exercise for newbie to manage package management.
In this tutorial we will include all major Linux distributions such as RHEL (RedHat), CentOS, Fedora, Debian, Ubuntu, openSUSE and Arch Linux systems.
1) How to List All Packages Installed on RPM Based Systems Using the RPM Command
You can use the RPM command with the -qa option to get a list of packages installed on RHEL (RedHat), CentOS, Fedora, and openSUSE systems.
RPM stands for RPM Package Manager formerly known as Red Hat Package Manager is a powerful package management system for Red Hat Enterprise Linux (RHEL) as well as other Linux distribution such as Fedora, CentOS, and openSUSE. RPM maintains a database of installed packages and their files, so you can invoke powerful queries and verification’s on your system.
2) How to Check All Packages Installed on RHEL (Red Hat) and CentOS Systems Using the YUM Command
Use the following YUM command to get the list of packages installed on RHEL (RedHat) and CentOS systems.
YUM stands for Yellowdog Updater, Modified is an open-source command-line front-end package-management utility for RPM based systems such as Red Hat Enterprise Linux (RHEL) and CentOS.
Yum is the primary tool for getting, installing, deleting, querying, and managing RPM packages from distribution repositories, as well as other third-party repositories.
Run the following command to view the detailed information about the given package.
3) How to Verify All Packages Installed on RHEL (Red Hat), CentOS and Fedora Systems Using the DNF Command
Use the following DNF command to get the list of packages installed on CentOS 8, RHEL 8 and Fedora systems.
DNF stands for Dandified yum is the next generation version of yum. It’s allow us to installs, updates, and removes packages on RPM-based Linux distributions. The DNF was introduced in Fedora 18, and it has been the default package manager for Fedora since version 22, CentOS8 and RHEL 8.
Run the following command to view the detailed information about the given package.
4) How to Find All Packages Installed on SUSE and openSUSE Systems Using the Zypper Command
Use the following Zypper Command to get a list of packages installed on SUSE and openSUSE systems.
Zypper is the command line package manager for suse and openSUSE distributions. It can be used to install, update, search, remove packages, manage repositories and perform various actions.
It uses the libzypp library for package management.
To view detailed information about the given package.
5) How to Check All Packages Installed on Arch Linux Based Systems Using the Pacman Command
Use the following Pacman command to get a list of packages installed on Arch Linux based systems such as Manjaro, ArcoLinux, Chakra, etc.
Pacman stands for package manager utility. pacman is a simple command-line utility to install, build, remove and manage Arch Linux packages. Pacman uses libalpm (Arch Linux Package Management (ALPM) library) as a back-end to perform all the actions.
To view detailed information about the given package.
6) How to List All Packages Installed on Deb Based Systems Using the DPKG Command
We can use the DPKG command to get a list of packages installed on Debian based systems such as Ubuntu and LinuxMint.
DPKG stands for Debian Package is a tool to install, build, remove and manage Debian packages, but unlike other package management systems, it cannot automatically download and install packages or their dependencies.
7) How to Find All Packages Installed on Deb Based Systems Using the Apt Command
Use the following Apt command to get a list of installed packages on Debian based systems such as Ubuntu and LinuxMint.
APT (Advanced Packaging Tool), a higher level tool, is more commonly used than dpkg as it can fetch packages from remote locations and deal with complex package relations, such as dependency resolution.
To view detailed information about particular package, run any of the below command.
8) How to Calculate the List of Packages Installed on Your System
Run the following command to calculate the list of packages installed on your Linux system. Use the package manager command according to your distribution.
9) How to Export a List of Installed Packages to a File in Linux
To export a list of packages installed on Linux, redirect the below command output to a file. The standard output is only redirected to the file and it is not displayed on the terminal. If the file already exists, it will be overwritten.
Источник
Ubuntu Documentation
Introduction
CheckInstall keeps track of all files installed by a «make install» or equivalent, creates a Slackware, RPM, or Debian package with those files, and adds it to the installed packages database, allowing for easy package removal or distribution.
Use CheckInstall instead of just running «sudo make install», as that will likely put files all over the filesystem, with no easy way of removing them if things go wrong. If in the future you try to install a package that contains the same file as the software you are compiling, you will receive errors and the software you compiled may stop working.
(In fact, checkinstall can keep track of files modified by any command line, not just a «make install», so you can use it for any type of installation task outside of apt, and it will keep track of the installation in the package manager.)
CheckInstall is not designed to produce packages suitable for distribution. Do not use it to produce packages intended for the Ubuntu archive or PPAs. Instead, follow the Packaging Guide.
From the checkinstall README: «The Debian support in CheckInstall is still new, so handle it with care. It has been reported to work OK in some Debian systems and it certainly works OK in my Slackware development system with dpkg installed. Your mileage may vary.»
Installation
Install the package checkinstall from the Repositories.
For help on installing software in Ubuntu, see InstallingSoftware.
A quick method via the terminal for those who like to copy and paste:
Usage
When called with no arguments, checkinstall will call «make install». If you need other arguments, they can be supplied:
The installed package can then also easily be removed via Synaptic or via the terminal:
Note that the .deb package it creates can also be used elsewhere, which simplifies installation of the same program on many machines.
Use CheckInstall with auto-apt
You can use auto-apt when you want to build a simple package from source with checkinstall. You need to have auto-apt installed!
If the dependencies are available, a dialog box opens and ask you to install them.
Источник
Ubuntu Documentation
Introduction
Note: The Main page is available in multiple languages.
Installing software in Ubuntu is easy, and this guide will show you how to do it.
By default, many useful programs are already installed when you put Ubuntu onto your computer. However, you may need a particular piece of software that serves a purpose not served by the default applications. You might just want to try an alternative program to one which is already installed. In other words, you need new software.
If you’d like to get some background information on what’s happening when you install software (which can sometimes be technical), read Packages and Package Management. If you just want to get started installing new programs, you can skip straight to Installing a Package.
Packages and Package Management
This section covers the basic concepts of packages and package management. You will learn about what a package is, the differences between different types of package and also how package management works on Ubuntu.
What is a package?
Software is a very broad term, and is generally taken to mean a program which you can run on your computer. However, such programs often need other resources to work. When you install software, thousands of files may be required just to let the program start! When you think that they all have to be put in exactly the right location, and some of those files may need to be changed depending on what type of computer you have, it can all get very complicated. Luckily, Ubuntu can look after this complexity.
Ubuntu uses packages to store everything that a particular program needs to run. A ‘package’, then, is essentially a collection of files bundled into a single file, which can be handled much more easily. In addition to the files required for the program to run, there will be special files called installation scripts, which copy the files to where they are needed (amongst other things).
Source or Binary?
Normally, when someone makes a package for a program, they put all of the source code for the program into that package. Source code is written by programmers and is essentially a list of instructions to a computer which humans are able to read and write. Computers can only understand this code if it is interpreted for them into a form that they can use directly. One such way of interpreting source code for a computer is by translating or compiling it into binary, which computers can understand.
So why don’t the people who make the package (called packagers) just convert it into binary from the start? Well, different computers use different types of binary, so if you make a binary package for one type (like an Intel PC), it won’t work on another (like a PowerPC).
Source packages are simply packages which just include source code, and can generally be used on any type of machine if the code is compiled in the right way. (For information on how to compile and install source packages, see CompilingEasyHowTo).
Binary packages are ones which have been made specifically for one type of computer, or architecture. Ubuntu supports the x86 (i386 or i686), AMD64 and PPC architectures. The correct binary packages will be used automatically, so you don’t have to worry about picking the right ones. To find out which one you are using, open Applications → Accessories → Terminal, type uname -m then hit the enter key.
Package Dependencies
Programs often use some of the same files as each other. Rather than putting these files into each package, a separate package can be installed to provide them for all of the programs that need them. So, to install a program which needs one of these files, the package containing those files must also be installed. When a package depends on another in this way, it is known as a package dependency. By specifying dependencies, packages can be made smaller and simpler, and duplicates of files and programs are mostly removed.
When you install a program, its dependencies must be installed at the same time. Usually, most of the required dependencies will already be installed, but a few extras may be needed, too. So, when you install a package, don’t be surprised if several other packages are installed too — these are just dependencies which are needed for your chosen package to function properly.
An example of dependencies
Package Managers
A package manager is an application which handles the downloading and installation of packages. Ubuntu includes a few package managers by default, and which one you use depends on how advanced the package management tasks are that you want to achieve. Most people will only need to use the most basic package manager, the Add/Remove tool, which is very easy to use.
Software Channels/Repositories
Where can you get packages from?
Ubuntu stores all of its packages in locations called software channels or repositories. A software channel is simply a location which holds packages of similar types, which can be downloaded and installed using a package manager. A package manager will store an index of all of the packages available from a software channel. Sometimes it will ‘re-build’ this index to make sure that it is up to date and knows which packages have been upgraded or added into the channel since it last checked.
There are four Ubuntu software channels for each architecture — Main, Restricted, Universe and Multiverse. Each has a different purpose. By default, only packages from Main and Restricted can be installed. If you would like to install packages from Universe or Multiverse, see the Repositories page for instructions on how to do this.
In addition to the official Ubuntu repositories, it is possible to use third party repositories. Be careful, though — some are not compatible with Ubuntu and using them may cause programs to stop working or may even cause serious damage to your installation. The page http://www.ubuntulinux.nl/source-o-matic (page removed — why) can help you to find extra repositories, and the Repositories page gives instructions on how to enable them.
Installing a Package
This section explains how to install packages using the various tools available in Ubuntu,Xubuntu,Edubuntu and Kubuntu.
Via your web browser
In the Ubuntu Documentation, you will sometimes find sentences like for example:
» To install this software in Ubuntu, install the following package: supertux. «
Click on the name of the package («supertux» in the example):
- if the apturl protocol is enabled on your computer, you will be proposed to install the package called «supertux».
if not, please follow instructions of the AptURL page to enable apturl protocol on your computer.
Via a basic graphical method
Note that some packages can’t be installed via this method, in this case please use another method.
for Ubuntu: «Sofware Centre «
In recent versions of Ubuntu, the «Add/Remove» option in the Applications menu has been replaced by the Ubuntu Software Center.
for Kubuntu : «Add/Remove Programs»
Kubuntu’s new and easy method of installing packages is to use the ‘Add/Remove Programs’ tool. Click K-Menu → Add/Remove Programs to start it.
Add/Remove Programs is a simple graphical way of installing and removing applications in Kubuntu. To launch Add/Remove Programs, choose K Menu → Add/Remove Programs from the desktop menu system.
To install new applications select the category on the left, then check the box of the application you want to install. When finished click Apply, then your chosen programs will be downloaded and installed automatically, as well as installing any additional applications that are required. The default selection is restricted to KDE suite, but GNOME applications can be installed simply by selecting from dropdown menu at the top. Alternatively, if you know the name of the program you want, use the Search tool at the top.
Software from additional repositories may be installed by enabling the Show: Unsupported and Show: proprietary software checkboxes if they are enabled in your repository list. For more information, see the Repositories page.
Once this has finished, click Close.Your new programs are installed, ready to use!
Via an advanced graphical method
for Ubuntu/Xubuntu/Edubuntu : Synaptic
The Synaptic Package Manager offers a more advanced way of installing packages. If you have problems finding a suitable package with the Add/Remove tool, try using the search in Synaptic. This searches all of the packages in the available repositories, even the ones which don’t contain programs.
For details on using Synaptic, see SynapticHowto.
Via a Text Based Methods
Text based methods can be used across Ubuntu, Kubuntu and Xubuntu, but require familiarity with the terminal. When helping users to install packages, you should consider using an AptURL instead of apt-get or aptitude.
Aptitude — the text-based method
Aptitude is a text-based package manager, which must be run from a Terminal. Read the AptitudeSurvivalGuide for more information on how to use Aptitude.
apt-get — the technical method
The apt-get program is a command-line package manager, which should be used if the Add/Remove tool and Synaptic ever run into problems. It provides an advanced interface to APT, the underlying package management system which Ubuntu uses, but is reasonably easy to operate. Power users may find that apt-get is quicker to use and more powerful than the graphical options above.
For details on how to use apt-get, read AptGet/Howto.
Installing downloaded packages
You may wish to install a package you have downloaded from a website, rather than from a software repository. These packages are called .deb files. Because they may have been created for a different Linux distribution, you might find that there’s dependency issues with Ubuntu, meaning that they may be uninstallable.
To find a package which you have previously downloaded using Synaptic, aptitude or apt-get, look in /var/cache/apt/archives
Using GDebi to install packages
GDebi is a simple tool to install .deb files. It has a graphical user interface but can also be used in your terminal. It lets you install local deb packages resolving and installing its dependencies.. It automatically checks packages for their dependencies and will try to download them from the Ubuntu software repositories if possible. You may first need to install GDebi — simply install the gdebi package using one of the package managers listed above, or open a Terminal and type sudo apt-get install gdebi.
Once you have installed GDebi, use the File Browser to find the package you wish to install. Package files will look similar to this:
Double-click the package to open it with GDebi. If all dependencies have been met for the selected package, simply click the ‘Install package’ button to install it. GDebi will warn you if there are unmet dependencies, which means that there’s dependencies that aren’t resolved in the repositories that you’re using.
Using dpkg to install packages
dpkg is a command-line tool used to install packages. To install a package with dpkg, open a Terminal and type the following:
Note: replace directory with the directory in which the package is stored and package_name with the filename of the package.
It is recommended that you read the dpkg manual page before using dpkg, as improper use may break the package management database. To view the manual page for dpkg, open a Terminal and type man dpkg.
Getting a list of recently installed packages
You can use the dpkg logs to discover recently installed packages; this is handy if you want to roll back some recent installations to a previous system state.
More detailed information on this can be found here.
Automatic updates: Update Manager
Ubuntu will automatically notify you when security updates and software upgrades are available. The Ubuntu Update Manager is a simple and easy to use application that helps users to keep their system software updated. Simply click the update icon (which will appear in the notification area), type in your super-user/administrator password and follow the instructions on-screen to download and install the updates.
Keeping up to date is important, as security fixes which protect your computer from harm are delivered in this way.
Installing packages without an Internet connection
Sometimes, an internet connection is unavailable to install programs.
It is possible to install programs without CDs or DVDs onto offline computers, using a simple USB key for example to transfer only the packages you need.
There are several methods to do this:
Use Keryx
Keryx is a portable, cross-platform package manager for APT-based (Ubuntu, Debian) systems. It provides a graphical interface for gathering updates, packages, and dependencies for offline computers. Keryx is free and open source. You can get Keryx here: https://launchpad.net/keryx
Use the Synaptic package download script
Short instructions:
- Launch Synaptic on the offline computer
- Mark the packages you wish to install
Select File->Generate package download script
Launch Synaptic and click on File->Add downloaded packages
Note: If you don’t have access to a PC with GNU/Linux or emulating/virtualizing GNU/Linux (Cygwin, VMware, VirtualBox, Qemu, etc), just open the script with a text editor and enter all the URLs you see in your browser to download the corresponding packages.
If you have all the necessary libraries and/or dependencies, the simplest way is of course to just download the .deb package you need, just as you would with a Windows installer, and double-click the package to install it with GDebi.
Use Offline apt-get update
If you can’t even select the packages on your offline PC because you can’t add the repository / update the package info, try this: AptGet/Offline/Repository
Basically, it consists in creating your own local repository, except that it won’t contain the packages themselves, only the dependency information.
The problem is that when you generate the package download list using this method, it will try to get the packages from your local repository and obviously fail.
The solution is to post-process the script by replacing the URLs with the correct one.
Assuming you created the local repository at «/home/username/repository» and got the different files from «http://archive.ubuntu.com/ubuntu/», this can easily be done with the following command:
or directly without creating a second script:
or simply with any text editor featuring search&replace.
Use apt-offline
apt-offline allows you to easily upgrade or install new packages on your offline PC, by using another online PC.
Источник