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.

shirish
  • 11,967
  • 27
  • 107
  • 190

1 Answers1

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.

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164