On Sun, 2026-07-19 at 13:42 -0400, Todd Zullinger wrote:
> Patrick O'Callaghan wrote:
> > I guess I should know this, but I'll ask anyway. For some time now
> > I've
> > been getting errors when trying to update MS Edge using dnf. Since
> > I
> > never actually use it I decided to just remove the package, but I
> > can't
> > even do that (presumably for the same reason the update fails):
> > 
> >    $ sudo dnf remove microsoft-edge-stable
> >    Package                                            Arch        
> > Version                                           
> > Repository                        Size
> >    Removing:
> >     microsoft-edge-stable                             x86_64      
> > 0:147.0.3912.72-1                                 
> > <unknown>                    625.9 MiB
> >     microsoft-edge-stable                             x86_64      
> > 0:150.0.4078.80-1                                 
> > <unknown>                    631.3 MiB
> >    
> >    Transaction Summary:
> >     Removing:           2 packages
> >    
> >    After this operation, 1 GiB will be freed (install 0 B, remove 1
> > GiB).
> >    Is this ok [y/N]: y
> >    Running transaction
> >    [1/3] Prepare
> > transaction                                                        
> >                                 100% |   5.0   B/s |   2.0   B | 
> > 00m00s
> >    [2/3] Removing microsoft-edge-stable-0:150.0.4078.80-
> > 1.x86_64                                                    100% |
> > 177.0   B/s | 389.0   B |  00m02s
> >    >>> Running %preun scriptlet: microsoft-edge-stable-
> > 0:147.0.3912.72-1.x86_64
> >    >>> Error in %preun scriptlet: microsoft-edge-stable-
> > 0:147.0.3912.72-1.x86_64
> >    >>> Scriptlet output:
> >    >>> /var/tmp/rpm-tmp.XlMkJM: line 191: syntax error near
> > unexpected token `}'
> >    >>> /var/tmp/rpm-tmp.XlMkJM: line 191: `}'
> >    >>> 
> >    >>> [RPM] %preun(microsoft-edge-stable-147.0.3912.72-1.x86_64)
> > scriptlet failed, exit status 2
> >    >>> Running %triggerpostun scriptlet: desktop-file-utils-0:0.28-
> > 5.fc44.x86_64
> >    >>> Finished %triggerpostun scriptlet: desktop-file-utils-
> > 0:0.28-5.fc44.x86_64
> >    >>> [RPM] microsoft-edge-stable-147.0.3912.72-1.x86_64: erase
> > failed
> >    Transaction failed: Rpm transaction failed.
> > 
> > Any insights would be appreciated.
> 
> I'd likely start by dumping out the scriptlets, so you can
> run any which might actually be needed to clean things up
> once the package is removed.  This can be done with:
> 
>     rpm -q --scripts microsoft-edge-stable
> 
> I haven't had to do this in long enough that I have always
> just used rpm directly.  It has options to disable the
> scriptlets, either entirely or with some granularity.  Refer
> to rpm(1) and the --noscripts option for details.  If the
> error is only in the %preun scriptlet, you could use
> --nopreun, for instance.
> 
> To remove the package via rpm without any %preun scriptlets,
> you could use:
> 
>     rpm -e --nopreun microsoft-edge-stable
> 
> You can disable scriptlets via dnf too, using the tsflags
> option.  It doesn't allow the granularity of rpm, but
> depending on what other scriptlets are present in the
> package, that might not matter.  With dnf, you'd pass
> tsflags via --setopt, e.g.:
> 
>     dnf --setopt=tsflags=noscripts remove microsoft-edge-stable
> 
> Then run whatever bits from the scripts which were skipped,
> as needed.  Well, the `pre*` scripts should be run before
> removing the package.

I did:

sudo rpm -e --noscripts microsoft-edge-stable-147.0.3912.72-1.x86_64
sudo rm -rf /opt/microsoft/msedge

and that seemed to work.

Thanks

poc
-- 
_______________________________________________
users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to