On Wed 07 Apr 2021 at 14:02:58 (-0400), Greg Wooledge wrote:
> On Wed, Apr 07, 2021 at 08:40:58PM +0300, Andrei POPESCU wrote:
> > While I'm a big fan of aptitude's patterns it's also not installed by 
> > default. For basic uses 'apt' is fine as well and supports globs:
> > 
> >     apt list --installed linux-image-4*
> > 
> >     apt purge linux-image-4.9.10-?-amd64
> 
> Remember that you need to quote these globs (at least the special
> characters in them), or else one day you *will* get a nasty surprise
> when one of them matches a file in your current working directory.

And I'm a big fan of -s with commands like these, so that
you know what's going to be changed. Then recall the command
and remove the -s.

I'm also a big fan of   mv -i   rather than rm, for similar
reasons. Remove the files only when you're sure the system
still works without them.

Cheers,
David.

Reply via email to