[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Removal of a Desktop Environment



On 2015-09-17 at 06:34, kamaraju kusumanchi wrote:

> On Wed, Sep 16, 2015 at 1:57 PM, Himanshu Shekhar
> <irm2015006@iiita.ac.in> wrote:
>
>> Hey!... I made it.
>> I selected all packages with name or description containing lxde from
>> synaptic and marked them for complete removal.
>> Now, the task is done and I got what I wanted.
>> Thanks :)
> 
> There is a simpler way to remove all packages whose name matches a
> regular expression. For example, in your case, I think you could do
> something like
> 
> % apt-show-versions -r kde | cut -f1 -d':' > pkg_list.txt
> % xargs -a pkg_list.txt sudo apt-get remove

If I'm not mistaken, there's an even easier way:

If 'apt-get install' or 'apt-get remove' doesn't see a package matching
the requested name, and the requested name contains one of a few
specific characters (see the man page), it treats the requested name as
a regular expression to be matched against the complete package list.

Therefore,

apt-get remove ".*lxde.*"

would probably have worked in this case.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: