Remove a source package src.rpm (opposite of zypper source-install, rpmbuild)

Hi

how to do the reverse process of (to remove completely a source package):

zypper source-install gradle

?

It seems there is no smart procedure to it:

zypper remove --details --clean-deps  gradle

issues that there is no package

zypper remove --details --clean-deps --type srcpackage gradle

issues that deinstallation of a source package is not defined nor implemented.

So what can I do?

The problem is:

rpmbuild -vv -bc --clean /usr/src/packages/SPECS/gradle.spec

of gradle package did not “rpmbuild” through to build my own package. As I discovered that there are already built packages out there, I decided to clean and remove all stuff that was created. Some of the building stuff I cleaned by:


rpmbuild  --clean /usr/src/packages/SPECS/gradle.spec
rpmbuild  --rmsource /usr/src/packages/SPECS/gradle.spec

And I guess eventually:


rpmbuild  --rmspec /usr/src/packages/SPECS/gradle.spec

But there is still a directory kept left in /usr/src/packages/BUILDROOT/gradle-2.3-4.1.x86_64 and may be other stuff that I don’t know of and stuff that was installed along with it (in my case java-1_8_0-sun-devel)

Is there a smart procedure to it, to remove and clean all that stuff instead of doing it by hand manually?

Tanks for any hint
Infinite_Dao

There is no guarantee that any app will be removed completely.

You can try inspecting the contents of the install package and manually removing its files, but manually removing files might damage other apps which were installed afterwards. eg.

rpm -ql gradle.rpm

If you need to undo a deleted file, I’ve recently become aware that btrfs can do this for you

snapper restore *filename* 

TSU

On 07/07/2017 09:56 AM, Infinite Dao wrote:
>
> Hi
>
> how to do the reverse process of (to remove completely a source
> package):
>
> Code:
> --------------------
> zypper source-install gradle
> --------------------
>
> ?
>
> It seems there is no smart procedure to it:
>
> Code:
> --------------------
> zypper remove --details --clean-deps gradle
> --------------------

When using zypper you can use tab completion to make sure you are
removing the package using the correct name. In your case:

Code:

zypper remove --details --clean-deps gra <tab><tab>


Ken
linux since 1994
S.u.S.E./openSUSE since 1996

A src package is not really “installed”.
It’s just downloaded, and its contents extracted.

You should find all the files in ~/rpmbuild/ (if you ran zypper as user) or /usr/src/packages/ (if you ran zypper as root).
Just delete them. (you may even delete the whole folder if you want)

On 07/08/2017 07:46 AM, wolfi323 wrote:
>
> A src package is not really “installed”.
> It’s just downloaded, and its contents extracted.
>
> You should find all the files in ~/rpmbuild/ (if you ran zypper as user)
> or /usr/src/packages/ (if you ran zypper as root).
> Just delete them. (you may even delete the whole folder if you want)
>
>

Understood. Thanks.


Ken
linux since 1994
S.u.S.E./openSUSE since 1996