Apt get show installed package

By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up. After doing a man apt-get and cursory Google search it's not clear how I find new programs to install from the internet using apt-get which is amazingly powerful and simple coming from another Linux distro.

Also you can use apt-cache search for command-line searching. With binaries in particular there is an application that is automatically run if you run a command that is not installed.

For example. I think, you are referring to the binary program name included in the package. I use this technique to find this:. Sometimes the terminal can tell your the package name required to be installed to have a desired program. It happens when the program is in Standard repository and you have enabled those repository. For example, If I type gnome-documents when no such package is installed, the terminal will tell be this:.

You can try the program 'aptitude' from the command line.

Subscribe to RSS

It is a graphical package manager. Remember to append sudo to the program to do any real installations. You can also use aptitude just like apt-get; "sudo aptitude install". I prefer apt-get for single packages that I know the names for.

Also, are you just on a command line? They function nearly the same however they have a simpler package search. You can get a long list of installable packages by typing apt-get install and then hitting TAB twice for autocomplete.By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service.

Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up. I have successfully installed some packages using the command line 'sudo apt-get install packagename' when I have known in advance that those packages are available.

Ubuntu software installation from command line using apt-get

But how can I search for or get a list of what is available in the repositories? Note: the list may be long, so you can pipe the output to less to make it scrollable one line or one screen at a time, i. Synaptic is often a more convenient way to do this, but requires at least an X server on your end unless you're running a desktop environment. Install with sudo apt-get install synaptic if necessary.

Using aptitudeapt-cacheand apt all format the output differently. None of these require the use of sudo when searching for a package. I prefer using apt for its readability. It highlights the package name and puts a space between the different packages. It also has [installed] listed next to each package that is already installed.

The apt-cache command line tool is used for searching apt software package cache. In simple words, this tool is used to search software packages, collects information of packages and also used to search for what available packages are ready for installation on Debian or Ubuntu based systems.

For more info about search patterns you can look up manual regex 7 by command man 7 regex or in English. A regex variable equal to. The above will give you ALL the results but it is not in any order that is particularly helpful for browsing. So finally we can sort by dictionary order using sort -d and show only a page at a time using less. Ubuntu Community Ask! Sign up to join this community. The best answers are voted up and rise to the top.

Home Questions Tags Users Unanswered. How do I search for available packages from the command-line? Ask Question. Asked 7 years, 9 months ago. Active 14 days ago. Viewed 1.By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. Ask Ubuntu is a question and answer site for Ubuntu users and developers.

It only takes a minute to sign up. I'd like to output a list of all installed packages into a text file so that I can review it and bulk-install on another system. How would I do this? To save that list to a text file called packages on your desktop do this in your terminal:. To get just the packages which were expressly installed not just installed as dependenciesyou can run.

This will also include a brief description, which you may want. Auto-Installed: 0 indicates that the package was expressly installed and is not just a dependency. To list all packages intentionally installed not as dependencies by apt commands, run the following :.

Installation data also showing synaptic usage, but without details the same with installation date :. To get installed like at backup time i. So, it should just give a list of explicitly installed packages though this includes packages that were part of the default initial install without all of the dependencies included due to these packages being installed. Note: You will get the result 1. You can use Synaptic to save the current state of your installed packaged.

I recommend using blueprint. Even though it is designed for servers, it can be also used from desktops as well. If so, it's very easy. You'll need an "Ubuntu Single Sign On account. When you click on it you will see your computer registered and a list of all apps on your computer.

As can be seen in the screenshot, Aptik lets you also backup and restore PPAswhich will certainly be necessary to install some of the packages installed. APT-Clone is used by ubiquity Ubuntu installer for upgrade process. It is much better than the dpkg --get-selections solution because:.By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service.

It only takes a minute to sign up. Before I install a package I'd like to know what version I would get. How do I check the version before installing using apt-get or aptitude on debian or ubuntu?

To see all possible upgrades, run a upgrade in verbose mode and to be safe with simulation, press n to cancel:. The option policy can show the installed and the remote version install candidate of a package. Passing the -u switch with or without a package name will only show upgradeable packages. The console GUI of aptitude can display upgradeable packages with new versions.

Open the menu 'Upgradable Packages'. Pressing v on a package will show more detailed version information. Passing -V will show detailed information about versions, again to be safe with the simulation switch:. Another option, if you don't know the full name of the package, is formatting aptitude's search output:.

Ubuntu 14.04 and above

I believe apt-get and apt-cache are being deprecated, with apt and aptitude becoming the preferred method. Given the longevity of the apt- suite, it's probably a safe bet for some time to come!

To see the latest available package before installing. Perform update so that you have all the latest package update. Now, To check the latest package available in your repository before installing run below command. Sign up to join this community. The best answers are voted up and rise to the top. Home Questions Tags Users Unanswered. Ask Question. Asked 9 years, 2 months ago. Active 1 year, 10 months ago. Viewed k times.

Active Oldest Votes.

You can install it by typing. Is it recommended to run apt-get install -s with sudo? Alf Alf 5 5 silver badges 2 2 bronze badges.By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. The dark mode beta is finally here. Change your preferences any time. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information.

I checked dpkg -l grep "hylafax" and found out that the current version is 5. Then I checked apt-cache search hylafax and saw the packages are available, but I can't see any version number. See more in aptitude 8. Also, the apt-show-versions package installed separately parses dpkg information about what is installed and tells you if packages are up to date.

Remaining arguments are package names. The available versions and reverse dependencies of each package listed are listed, as well as forward dependencies for each version. Forward normal dependencies are those packages upon which the package in question depends; reverse dependencies are those packages that depend upon the package in question. Thus, forward dependencies must be satisfied for a package, but reverse dependencies need not be. You can also just simply do the regular apt-get update and then, as per the manual, do:.

Which will show you the current package vs the one which will be upgraded in a format similar to the one bellow:. Learn more. How to check the version before install packages using apt-get Ask Question. Asked 6 years, 7 months ago. Active 6 months ago. Viewed k times. How can I find the version of packages available in the apt-get? Peter Mortensen Yasiru G Yasiru G 5, 5 5 gold badges 15 15 silver badges 36 36 bronze badges.

Active Oldest Votes. OK, I found it. It also shows which version is currently installed and which versions are available to install.By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. It only takes a minute to sign up. I want my cron-run reporting script to notify me in case there are updates for my packages.

Is the a way to make apt-get give me the list of available updates but don't do anything more? For the old apt-get command the -u switch shows a list of packages that are available for upgrade:. From the apt-get man page :. Wheezy, ZSH, aptitude 0. Apticron is a simple script which sends daily emails about pending package updates such as security updates, properly handling packages on hold both by dselect and aptitude. First command updates package index files before simulated thus -s upgrade is done.

I needed full version information on possible upgrades, so I used a modification of jasonwryan's answer:. Jet another on-liner, inspired by this answer :. Unfortunately, this one doesn't work with debian wheezy and I had to check some lxc containers which are still not upgraded.

This form will always work:. Finally, I also wanted to reformat the output. I chose to change the call again using --dry-run but ignoring all additional output because it feels more safe:. Stick it into a script named apt-updates and you can then call apt-updates to get a listing of all updates regardless of user. There's the apt-show-versions tool.

To show available updates run:. This way you can simply couple it with a monitoring solution. Sign up to join this community.

How to Check version of Installed Package on Ubuntu and Debian

The best answers are voted up and rise to the top. Home Questions Tags Users Unanswered. List available updates but do not install them Ask Question. Asked 8 years, 7 months ago.

apt get show installed package

Active 27 days ago.By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. The dark mode beta is finally here.

Change your preferences any time. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. You can also use dpkg-query that has a neater output for your purpose, and accepts wild cards, too. For further details, see article Find out if package is installed in Linux and dpkg cheat sheet.

Apt Get List Installed | List Installed Packages with Apt on Ubuntu

To be a little more explicit, here's a bit of bash script that checks for a package and installs it if required. Of course, you can do other things upon finding that the package is missing, such as simply exiting with an error code. If the script runs within a GUI e. I like dpkg -s as it exits with status 1 if any of the packages is not installed, making it easy to automate:.

apt get show installed package

In this state, the package appears to be still usable, and as its files are still present, but it is marked for removal later on. I don't understand why, but with the hello package the second dpkg after apt remove shows that he package has already been removed without --purge :.

There is a pre-installed Python 3 package called apt in Ubuntu A script that checks if a package is installed and installs it if not can be seen at: How to install a package using the python-apt API. See: How can I check if a program exists from a Bash script? The return code of dpkg -s is 0 if the package is installed and 1 if it's not, so the simplest solution I found was:.

I've settled on one based on Nultyi's answer :. Basically, the error message from dpkg --get-selections is far easier to parse than most of the others, because it doesn't include statuses like "deinstall".

apt get show installed package

It also can check multiple packages simultaneously, something you can't do with just error codes. I've found all solutions above can produce a false positive if a package is installed and then removed yet the installation package remains on the system. To replicate: Install package apt-get install curl Remove package apt-get remove curl.

This feature already exists in Ubuntu and Debian, in the command-not-found package.


thoughts on “Apt get show installed package

Leave a Reply

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