[Feature] view already installed package when pacman -Ss

Maybe I've miss something but when I pacman -Ss sth
I have a list of package related to this sth but it would be nice to know if it's already installed
Also yaourt include this feature already
Last edited by ChoK (2008-10-25 20:46:58)

Here's a script that you can use to search the repos and see which of the results you already have installed:
#!/usr/bin/python
import sys
import os
import re
# colors
CURRENT_VERSION="\x1B[0;32m" # used if installed version is the current version
OLDER_VERSION="\x1B[0;36m" # used if installed version is an older version
RESET="\x1B[0;39m" # the default color
def get_args():
if len(sys.argv) > 1:
return ' '+' '.join(sys.argv[1:])
else:
return ''
local_pkgs = {}
local_regex = re.compile('(\S+)\s+(\S+)\s*(?:\n|$)')
local_list = os.popen('pacman -Q').read().rstrip()
for match in local_regex.findall(local_list):
(pkg,ver) = match
local_pkgs[pkg] = ver
search_regex = re.compile('((\S*?/)(\S+)\s+(\S+)(.*?)\n(\s+.*?)(?:\n|$))')
search_list = os.popen('pacman -Ss'+get_args()).read().rstrip()
for match in search_regex.findall(search_list):
(full,repo,pkg,ver,group,desc) = match
if local_pkgs.has_key(pkg):
if ver == local_pkgs[pkg]:
print "%s%s%s %s%s\n%s" % (CURRENT_VERSION,repo,pkg,ver,RESET,desc)
else:
print "%s%s%s %s%s\n%s" % (OLDER_VERSION,repo,pkg,ver,RESET,desc)
else:
print full.rstrip()
Just pass it the search term that you would pass pacman. I've added 4 comments at the top to make it clear how to change the output colors if you want.

Similar Messages

  • Can't update/search/install packages via pacman or yaourt

    Everything was fine until I manually installed package-query and yaourt and now I am unable to update/search/install packages via pacman or yaourt.
    Earlier I was having trouble installing the package-query and yaourt packges using pacman so had to install them manually and now it wont connect to the repos.
    My eth0 is up, the proxies are set, all browsers work so no problem from the network side.
    :: Synchronizing package databases...
    error: failed retrieving file 'core.db' from mirror.us.leaseweb.net : Connection timed out after 10001 milliseconds
    error: failed retrieving file 'core.db' from mirror.nl.leaseweb.net : Connection timed out after 10001 milliseconds
    error: failed retrieving file 'core.db' from mirror.de.leaseweb.net : Connection timed out after 10001 milliseconds
    error: failed retrieving file 'core.db' from archlinux.polymorf.fr : Connection

    clfarron4 wrote:I usually advise against this (mainly because it's out-dated) but there is the [archlinuxfr] repository for installing yaourt, if you really insist on sticking with it. Once you're done, disable the repository though because everything except for yaourt is out-of-date by at least a month.
    Don't ever suggest that. The repo is 100% useless since it is trivial to install yaourt from aur. Also yaourt/package-query in that repo is often broken/outdated.
    Also it is not relevant to op's problem anyway. There were some routing issue to leseweb the other day, I also noticed it. Just switching mirror works fine.
    Last edited by Mr.Elendig (2013-09-04 13:37:49)

  • Photoshop says its already installed even when its not.

    I have installed all the other programs that I need however Photoshop for some reason is not installing. It says that it is already installed but when you go to applications it is not there. In the adobe download manager it shows as ligthened out as seen in the images below.
    If anyone could help that would be great.
    Thanks

    Run the Creative Suite Cleaner Tool.
    Mylenium

  • Adding new Feature in already deployed package

    Hi!
    Please consider the following scenario:
    I have a SP Project that contains a Package and a Feature. This package has been deployed and the feature has been activated already in a farm. Now I want to add a new Feature in the existing package and redeploy it in order to activate the new feature
    without affecting the old one.
    I'm using Update-SPSolution to update the package in the farm but it seems that the new feature does not appear in the list of features of the sites. I read this
    http://sharepoint.stackexchange.com/questions/45675/how-do-i-update-an-already-existing-wsp-on-farm which suggests that if I want to add a new feature I need to uninstall and reinstall the package. But if I do that the old feature will be deactivated which
    means that data will be lost!
    Isn't there any other way?
    Dimitris Papadimitriou, Software Development Professional

    Try running
    Install-SPFeature manually and check. The feature folder would be available on all servers since it was part of the solution.
    This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

  • How to filter installed packages in Pacman -Ss

    I want to search a package in the repos but I don't want to see installed packages, I want to see only uninstalled packages. Is it possible? It is not very important or urgent, but I want to know if it is possible.

    @Trilby, @ progandy
    Thank you for your posts.
    @progandy
    I wrote a simple bash function with your answer, now I have what I want. Thank you again.
    pacmanSs ()
    if [ -z "$1" ] ; then
    echo "Write something to search..."
    else
    pacman --color=always -Ss $1 | sed '/\S.*\[installed\]/,/^\s/d'
    fi

  • Reinstalling all installed packages using pacman

    I feel my installation is corrupted .volcontrol muted on every boot,nautilus crashing,etc and more.
    So,I though of reinstalling whole Gnome-2.22
    I got below script somewhere in this forum or wiki maybe:but the script is erring out :?
    please help !
    pacman -S $(pacman -Qq | grep -v "$(pacman -Qmq)")
    and got the below error message
    error: no targets specified (use -h for help)
    Last edited by praka123 (2008-04-24 14:47:47)

    Run the command pacman -Qq and pacman -Qmq separately and try to find out why it breaks.
    pacman -Q displays all packages, pacman -Qm displays the packages that are not in any repos, that is the packages you installed manually == foreign packages. You can't reinstall these foreign packages with pacman -S by definition.
    So you have to filter them out of pacman -Q output.
    pacman -S $(pacman -Qq) fails here, because I have 3 foreign packages, but  pacman -S $(pacman -Qq | grep -v "$(pacman -Qmq)") works.

  • Adobe Application manager says I have already installed programs when that is not true

    Hi there,
    I have a CS6 subscription, and whenever I try to download and set up an application, it says that the program is already installed on two computers. Which is not true as I am going for the first install of that program.
    I just spent an hour waiting for InDesign CS6 to download and install, and now I cannot start using it as it says it is already on two computers. AIt would be good to get the warning saying the program is already set up on two computers BEFORE I wait an hour for the program to download and install.
    Online chat is not available and the phone number on the website is for the USA. I am in Australia.
    How can I get help to solve this problem? I have NOT installed InDesign CS6 before, so how can the Application Manager think I have already installed it twice?
    What is wrong with the application manager or my subscription? I am paying monthly to get access to CS6 programs and I am just getting error messages after a long wait.
    Very frustrating.

    Sam if you are receiving the message that the software has already been activated on two other computers then please choose the deactivate all option.  You can then activate on your computer and then reactivate or activate on another computer.

  • My office says it cant be installed because a newr version is already installed but when i go to word its not working

    Please help, word will not work on my mac book pro so I uninstalled word now I cannot reinstall it it keeps telling me that a newer version is already installed but there is nothing.

    You may contact Microsoft as iheartapple1970 suggests or erase your HDD, reinstall your OS and then install Word.  If you choose to do so, make certain that your user data id backed up.
    Ciao.

  • A later version of itunes is already installed.Even when trying to unistall

    I can't update itunes and i can't unistall itunes everytime i try, i get the message 'A later version of itunes is already installed. Installation of this version cannot continue'.
    I've tried to manually unistall itunes but that doesn't work.
    I've google'd the problem but no one seems to have had this problem.
    Does anyone at all have any idea, how to i can resolve this issue???

    Did you do all the steps in the scond article recommended by Jason?It would help if you explained exaclty what steps you have taken.
    Usually this issue is solved by cleaning up the installer files with the Microsoft Installer Cleanup Utility. Did you do That?
    In case it helps here is a step by step method for removal of iTunes, installer clean up and reinstall.
    == uninstall with cleanup ==
    Download a fresh copy of iTunes and the stand alone version of Quicktime
    http://www.apple.com/quicktime/download/win.html
    http://www.apple.com/itunes/download/
    Download and install Microsoft Installer cleanup utility, there are instructions on the page as well as the download. Note that what you download is the installer not the program – you have to run it to install the program
    http://support.microsoft.com/kb/290301/
    Now use the following method to remove iTunes and its components:
    XP
    http://docs.info.apple.com/article.html?artnum=93698
    Vista
    http://docs.info.apple.com/article.html?artnum=305409
    If you hit a problem with one of the uninstalls don't worry, carry on with the deleting of files and folders as directed in the method.
    Restart your PC.
    Run the Microsoft Installer Cleanup Utility. (Start > All Programs > Windows Install Clean Up)
    Remove any references you find to the programs you removed - strictly speaking you only need to worry about those programs where the uninstall failed.
    restart your PC
    Install the stand alone Quicktime and check that it works.
    If it does, install iTunes.
    ===

  • Why does Firefox not acknowledge that I have Silverlight already installed. When trying to work with "Getting Started" in Windows 7, it keeps telling me I have to download Silverlight to view this information.

    I recently purchased a new computer with Windows 7 OS. When trying to learn the transition experience from Windows XP to this new OS version, I was presented with this problem of going around in circles.
    When trying to view "Discover Windows 7" via "Start>Getting Started>Discover Windows 7", a Microsoft website opens to; (http://windows.microsoft.com/en-US/windows7/help/videos/personalizing-your-pc). It tells me; To view this contents, please install Microsoft Silverlight. Once I install it and get back to this page, I get the same message. I can not view any of the help content before installing Microsoft Silverlight. So now it is a never ending "CIRCLE of LIGHT"! Is this a problem with my Firefox or with Windows Microsoft 7?

    I'm not seeing the Silverlight plugin in your More system details list, so Firefox doesn't find it if you have it.
    I assume that you also do not see it in Tools > Add-ons > Plugins ?

  • Already installed package - not by Arch?

    OK, this is and odd one. Many moons and several distros ago, I installed burg to a separate /boot partition, and have continued to use this /boot partition throughout. the original installation distro has long since been eradicated from my system, and I've maintained burg.cfg manually (for those that don't know, burg and grub are much the same, except burg has additional theming).
    Tonight, I decided to save myself some effort and install burg from AUR, reusing my existing config. I use packer for AUR, which has (rather un-helpfully this time) advised me that "package burg....etc is up to date - reinstalling". How does it know? Arch doesn't know anything about my bootloader at all.

    @ cfr
    Not possible. When I installed Arch I did so on to a bare partition, so no burg scripts or configuration files lying around to remove or run. (I formatted the partition thus eradicating the old distro). burg was fully contained within /boot, hence my having configured it directly (burg.cfg) all this time
    @fsckd
    Nothing in the logs other than the most recent installation. Your "haunted" idea may have some mileage, though :-0

  • I just bought this mac and it was already installed and when i try to download the new updates it won't put my username in. It has someone else's username installed on it so how do i do a reset? Please help!!!!

    Please help

    The first thing you should do with a second-hand computer is to erase the internal drive and install a clean copy of OS X. How you do that depends on the model. If you're not sure of the model, look it up from the serial number on this page. Then find the model on this page to see what OS version was originally installed.
    If the machine shipped with OS X 10.4 or 10.5, you need a boxed and shrink-wrapped retail Snow Leopard (OS X 10.6) installation disc, which you can get from the Apple Store or a reputable reseller — not from eBay or anything of the kind. If the machine has less than 1 GB of memory, you'll need to add more in order to install 10.6. I suggest you install as much memory as it can take, according to the technical specifications.
    If the machine shipped with OS X 10.6, you need the installation media that came with it: gray installation discs, or a USB flash drive for some MacBook Air models. If you don't have the media, order replacements from Apple. A retail disc, or the gray discs from another model, will not work.
    To boot from an optical disc or a flash drive, insert it, then reboot and hold down the C key at the startup chime. Release the key when you see the gray Apple logo on the screen.
    If the machine shipped with OS X 10.7 or later, you don't need media. It should boot into Internet Recovery mode when you hold down the key combination option-command-R at the startup chime. Release the keys when you see a spinning globe.
    Once booted from the disc or in Internet Recovery, launch Disk Utility and select the icon of the internal drive — not any of the volume icons nested beneath it. In the Partition tab, select the default options: a GUID partition table with one data volume in Mac OS Extended (Journaled) format. This operation will permanently remove all existing data on the drive, which is what you should do.
    After partitioning, quit Disk Utility and run the OS X Installer. When the installation is done, the system will automatically reboot into the Setup Assistant, which will prompt you to transfer the data from another Mac, its backups, or from a Windows computer. If you have any data to transfer, this is usually the best time to do it.
    You should then run Software Update and install all available system updates from Apple. If you want to upgrade to a major version of OS X newer than 10.6, get it from the Mac App Store. Note that you can't keep an upgraded version that was installed by the previous owner. He or she can't legally transfer it to you, and without the Apple ID you won't be able to update it in Software Update or reinstall, if that becomes necessary. The same goes for any App Store products that the previous owner installed — you have to repurchase them.
    If the previous owner "accepted" the bundled iLife applications (iPhoto, iMovie, and Garage Band) in the App Store so that he or she could update them, then they're linked to that Apple ID and you won't be able to download them without buying them. Reportedly, Apple customer service has sometimes issued redemption codes for these apps to second owners who asked.
    If the previous owner didn't deauthorize the computer in the iTunes Store under his Apple ID, you wont be able toauthorize it under your ID. In that case, contact iTunes Support.

  • Re-install all already installed packages

    Is there an easy way to do this with pacman? Lights went out and I can't identify three libraries linked at lost+found.
    Thank you!

    If everything you've installed is from a repo, this will do it:
    pacman -S $(pacman -Q | cut -d " " -f 1 | tr "n" " ")
    If you have installed anything locally, it will abort on each one:
    foo-pkg: not found in sync db
    so you'll need to remove them from the list and reinstall them separately.
    I expect someone else will be along shortly with a smarter solution.

  • I uninstalled itunes to fix some ipod issues, and now I tried to reinstall it but it says that it's already installed.

    I uninstalled itunes to fix some ipod issues, and now I tried to reinstall it but it says that it's already installed. When I went to find the "icon" I can"t find it. When i looked in the download files I saw the downloads, but not the actual itunes "app". Please help thanks!

    How did you uninstall it and what were your IPOD issues - that may help clarify the problem.

  • I'm trying to reinstall Logic Pro 9, and it says It's already installed. I have a project due for class and I need help asap. Please help!!!

    I'm trying to reinstall Logic Pro 9, and it says It's already installed. I have a project due for class and I need help asap. Please help!!!

    Yea I am. I deleted Logic Pro 9 and moved the App to the Trashcan like normal. Then when I go to install it, it says its already Installed. When I do this with other apps; it works fine, the install thing comes back up like it should once you have deleted the app

Maybe you are looking for

  • How to use Multiple Homes on Windows Box for patching

    Reading an Article by Arup Nanda 04.23.2007 talks about using multiple oracle homes for patching. We've installed oracle again and now have 2 Oracle Homes (db_1 and db_2). If I look at my service startup for the database I see this: c:\oracle\product

  • MacBook Can't Print Wirelessly on Officejet Pro 8500A

    I just got an Officejet Pro 8500A and it can't print wirelessly in by wife's MacBook, but it can print with a USB port. It can also print off my HP laptop wirelessly which has windows 7.

  • Determine the fax number or EMAIL address for pur docs

    Hi, I am trying to send pur doc via fax or EMAIL. I have created specific  message types for that purpose. The fax is created and sent to the default fax number / EMAIL address. I want the message to be sent to the same vendor but to other fax number

  • Firefox and other crashes

    I've noticed lately running Shiretoko 3.5.3 that every once in a while it will just crash. I'm just clicking on a link. This morning, I ran the latest updates and they seem OK. a few minutes later I was in Shiretoko and updating a webpage in Kompozer

  • Developing a java applet questions?

    I am new to java, I want to write a java applet to do the printing for word document and pdf, is it possible, I hope that one expert can share me a good sample code . By the way, for developing a java applet , what development environment should I in