1

I use an alias to find new packages whenever I update the package index.

[$] alias aptn

aptn='aptitude search '\''~N'\'

Now while this works, I also get a bunch of -dbgsym packages which come whenever I run the above alias as I have debug packages in my /etc/apt/sources.list

##### Debug packages #######
deb http://debug.mirrors.debian.org/debian-debug/ testing-debug main
deb http://debug.mirrors.debian.org/debian-debug/ unstable-debug main
deb http://debug.mirrors.debian.org/debian-debug/ experimental-debug main

Now is there a way to tell aptitude that search the new packages but only tell/share those packages which do not have -dbgsym in front of the package name, something like libwebp5-dbgsym or libweed0-dbgsym to take as examples. If yes, then how ?

Update - I use zsh on my workstation but the answer works on zsh as well.

  • 1
    aptn |grep -v '-dbgsym' Excluding matches via negated grep query? – kba Jul 26 '16 at 16:04
4

You can do this by combining both patterns in a single command-line argument:

aptitude search '~N !-dbgsym$'

This causes the search to look for packages with are both new and whose name doesn't match the -dbgsym$ regex. If the regex is added as a separate argument (aptitude search '~N' '!-dbgsym$'), packages match if they match either pattern.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.