Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #178681 > unrolled thread
| Started by | kamaraju kusumanchi <raju.mailinglists@gmail.com> |
|---|---|
| First post | 2017-03-11 16:30 +0100 |
| Last post | 2017-03-13 20:50 +0100 |
| Articles | 5 — 4 participants |
Back to article view | Back to linux.debian.user
prevent "dpkg -l" from showing nonexisting packages kamaraju kusumanchi <raju.mailinglists@gmail.com> - 2017-03-11 16:30 +0100
Re: prevent "dpkg -l" from showing nonexisting packages Brian <ad44@cityscape.co.uk> - 2017-03-11 18:10 +0100
Re: prevent "dpkg -l" from showing nonexisting packages kamaraju kusumanchi <raju.mailinglists@gmail.com> - 2017-03-13 05:30 +0100
Re: prevent "dpkg -l" from showing nonexisting packages Vincent Lefevre <vincent@vinc17.net> - 2017-03-13 16:00 +0100
Re: prevent "dpkg -l" from showing nonexisting packages Cindy-Sue Causey <butterflybytes@gmail.com> - 2017-03-13 20:50 +0100
| From | kamaraju kusumanchi <raju.mailinglists@gmail.com> |
|---|---|
| Date | 2017-03-11 16:30 +0100 |
| Subject | prevent "dpkg -l" from showing nonexisting packages |
| Message-ID | <tjR7X-4Eb-19@gated-at.bofh.it> |
The output from "dpkg -l" is showing some packages that are not
present in the repositories I track. How to change this behaviour so
it only shows packages that are available in repositories?
Consider for example
% dpkg -l \*flash\*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-====================-===============-===============-==============================================
un flashplayer-mozilla <none> <none> (no
description available)
un flashplugin <none> <none> (no
description available)
rc flashplugin-nonfree 1:3.7 amd64 Adobe Flash
Player - browser plugin
un hal-flash <none> <none> (no
description available)
un libflash-mozplugin <none> <none> (no
description available)
which shows flashplayer-mozilla in the output. But that package does
not exist in the repositories.
% rmadison flashplayer-mozilla
<returns no output>
My repositories are
% inxi -r
Repos: Active apt sources in file: /etc/apt/sources.list
deb http://httpredir.debian.org/debian/ stretch main contrib non-free
deb-src http://httpredir.debian.org/debian/ stretch main
contrib non-free
deb http://httpredir.debian.org/debian/ stretch-updates
main contrib non-free
deb-src http://httpredir.debian.org/debian/ stretch-updates
main contrib non-free
deb http://security.debian.org/ stretch/updates main contrib non-free
deb-src http://security.debian.org/ stretch/updates main
contrib non-free
deb http://debug.mirrors.debian.org/debian-debug/
stretch-debug main contrib non-free
% uname -a
Linux hogwarts 4.9.0-2-amd64 #1 SMP Debian 4.9.13-1 (2017-02-27)
x86_64 GNU/Linux
thanks
raju
--
Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog
[toc] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2017-03-11 18:10 +0100 |
| Message-ID | <tjSGK-5RQ-1@gated-at.bofh.it> |
| In reply to | #178681 |
On Sat 11 Mar 2017 at 10:21:13 -0500, kamaraju kusumanchi wrote: > The output from "dpkg -l" is showing some packages that are not > present in the repositories I track. You are referring to the repositories you track now. What about those repositories you no longer track. (Does deb-multimedia ring any bells?) > How to change this behaviour so > it only shows packages that are available in repositories? Impossible. 'dpkg -l' only shows packages which have files on the system. Perhaps you would like to reframe your query?
[toc] | [prev] | [next] | [standalone]
| From | kamaraju kusumanchi <raju.mailinglists@gmail.com> |
|---|---|
| Date | 2017-03-13 05:30 +0100 |
| Message-ID | <tkpMm-3kA-3@gated-at.bofh.it> |
| In reply to | #178683 |
On Sat, Mar 11, 2017 at 12:08 PM, Brian <ad44@cityscape.co.uk> wrote: > On Sat 11 Mar 2017 at 10:21:13 -0500, kamaraju kusumanchi wrote: > >> The output from "dpkg -l" is showing some packages that are not >> present in the repositories I track. > > You are referring to the repositories you track now. What about those > repositories you no longer track. (Does deb-multimedia ring any bells?) > You are right. I did add deb-multimedia at some point and then commented it out now. Those packages may be lying around in my system now. >> How to change this behaviour so >> it only shows packages that are available in repositories? > > Impossible. 'dpkg -l' only shows packages which have files on the system. > > Perhaps you would like to reframe your query? > Let me rephrase my question. If "dpkg -l" cannot do it, is there some other command that will only show packages from the current repositories? If "dpkg -l" only shows packages which files on the system, what files should I remove, so that packages such as flashplayer-mozilla will not show up in its output? If there is no generic way of doing it, can I do it just for just flashplayer-mozilla package? thanks raju -- Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog
[toc] | [prev] | [next] | [standalone]
| From | Vincent Lefevre <vincent@vinc17.net> |
|---|---|
| Date | 2017-03-13 16:00 +0100 |
| Message-ID | <tkzC3-1Yl-37@gated-at.bofh.it> |
| In reply to | #178741 |
On 2017-03-13 00:23:54 -0400, kamaraju kusumanchi wrote: > On Sat, Mar 11, 2017 at 12:08 PM, Brian <ad44@cityscape.co.uk> wrote: > > On Sat 11 Mar 2017 at 10:21:13 -0500, kamaraju kusumanchi wrote: > >> How to change this behaviour so > >> it only shows packages that are available in repositories? > > > > Impossible. 'dpkg -l' only shows packages which have files on the system. > > > > Perhaps you would like to reframe your query? > > Let me rephrase my question. If "dpkg -l" cannot do it, is there some > other command that will only show packages from the current > repositories? Perhaps apt-show-versions, which can check whether a package is in a repository. You will need options and/or grep. For instance, on one of my machines, I get in the output: unison2.40.102:amd64 2.40.102-3 installed: No available version in archive i.e. apt-show-versions detects that this package is installed, but no longer in any declared repository. AFAIK, aptitude can do similar things. > If "dpkg -l" only shows packages which files on the system, what files > should I remove, so that packages such as flashplayer-mozilla will not > show up in its output? "rc" means that the package has been removed but its conffiles are still there (i.e. the package has not been "purged"). You can get the list of remaining files with: dpkg -L <package_name> You can purge the package (i.e. remove all the conffiles) with: dpkg -P <package_name> > If there is no generic way of doing it, can I do it just for just > flashplayer-mozilla package? Note: There is a package that downloads the non-free Flash plugin. These files are not from the package, thus will not be detected by dpkg. If you have used it and purged the package, you should manually check that everything has been cleaned up (perhaps this package ensures that, though). -- Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
[toc] | [prev] | [next] | [standalone]
| From | Cindy-Sue Causey <butterflybytes@gmail.com> |
|---|---|
| Date | 2017-03-13 20:50 +0100 |
| Message-ID | <tkE8F-5gy-3@gated-at.bofh.it> |
| In reply to | #178763 |
On 3/13/17, Vincent Lefevre <vincent@vinc17.net> wrote: > On 2017-03-13 00:23:54 -0400, kamaraju kusumanchi wrote: >> Let me rephrase my question. If "dpkg -l" cannot do it, is there some >> other command that will only show packages from the current >> repositories? > > Perhaps apt-show-versions, which can check whether a package > is in a repository. You will need options and/or grep. > > For instance, on one of my machines, I get in the output: > > unison2.40.102:amd64 2.40.102-3 installed: No available version in archive > > i.e. apt-show-versions detects that this package is installed, > but no longer in any declared repository. Ooohhh, NICE find! I never would have thought about it because I've never seen apt-show-versions produce that output. I started to write: Is there a way to perform maybe a "reverse" grep sent to a file that was an "apt-show-versions -u" (or any other) query with everything EXCEPT those packages that return "No available version in archive"? And then I went to "man grep" = THERE IS A WAY!!!! At least it worked on my end. I don't have anything that's not from that one-liner repository I use (in /etc/apt/sources.list) so I tried: apt-show-versions | grep -v "uptodate" -i That "-v" is interchangeable with "--invert-match". Both allow you to: "Invert the sense of matching, to select non-matching lines" Better yet, I just did: apt-show-versions | grep -v "uptodate" -i > notUpToDate20170313 THAT... returned ONLY the lines that did NOT contain "uptodate" out of the tons of packages I have installed AND then sent that query to a file that is easier FOR ME to read and manipulate (versus seeing it on the terminal display). I A-SUME but cannot test drive that the following MIGHT be usable for someone somewhere... some day: apt-show-versions | grep -v "No available version in archive" -i > thePackagesIwanted OR, depending on your need, maybe something like: apt-show-versions -u | grep -v "No available version in archive" -i > thePackagesIwanted Yes, no, maybe so? For those who have not seen the ">" yet, that was a tremendous tip I learned on the fly years ago. It outputs what you're doing to a file. There's a no-brainer "caveat" to using that. You must have rights to access the directory that you're issuing that command from, else it WILL fail. E.g. I can't issue that command while my terminal is showing that I'm sitting in the /etc directory. It DOES work if I change the file path to "~/notUpToDate20170313", e.g.: elf@northpole:/etc$ apt-show-versions | grep -v "uptodate" -i > ~/notUpToDate20170313 I say again....... Oooohhhh :) Cindy :) -- Cindy-Sue Causey Talking Rock, Pickens County, Georgia, USA * runs with duct tape *
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web