jnrgadgets.blogg.se

Debian show installed packages
Debian show installed packages













debian show installed packages debian show installed packages

Having to parse the text seems like a less-than-ideal solution if that's what you suggest, please argue why there isn't a better way.For more information about what goes in which directory, check out the Filesystem Hierarchy Standard, which Ubuntu follows for the most part.

• Bonus points if it can be a proper regexp rather than just a shell glob. 3 Answers Sorted by: 8 Example code on Debian-based systems like Ubuntu is usually stored in /usr/share/doc//examples.

So, bottom line: What's the right way to get the list of installed packages matching a pattern? If you remove the grep -q youll get output of the matched repo line as well for confirmation, or otherwise. I could use dpkg-query -list "linux-image-*" | grep "ii"īut then I'd need to do a bunch of text processing, and who can trust those spaces, right? Quite ugly, as we need to run apt-cache twice, once to get the installed version of a package and a second time to match that installed version against the target repo, which conveniently can be matched by just 'jessie' in this case. I can run dpkg-query like so: dpkg-query -showformat='$\n' -show "linux-image*"īut that's not limited to installed packages. I can do that by, running, say, apt list -installed "linux-image-*" | cut -d/ -f1īut I get lines I don't care for, e.g.: WARNING: apt does not have a stable CLI interface. I'd like to generate a plain list of all installed packages matching a certain pattern.

debian show installed packages

I'm on system running a (fairly recent-)Debian-based distribution. On ubuntu, the site-packages folder that contains packages installed via setuptools\easyinstall\pip will be in /usr/local/lib/pythonX.X/dist-packages The second folder is probably the more useful one if the use case is related to installation or reading source code.















Debian show installed packages