I can’t find the answer for this use case;
I install an application with the GUI. A lot of new packages/dependencies are installed, some are updated. I try the new application for few minutes/hours and I want to remove it after.
How can I uninstall all the packages to get my config in the same state as previous, I mean remove all the previous installed packages but still have working older applications?
I know this could be done easily with BTRFS but my disks are with EXT4.
This should apply to all Leap version, isn’t it?
There is no automatic way to do it. You may check “rpm -qa --last” or /var/log/zypp/history and manually collect packages installed at approximately the same time.
There is “zypper pa --unneeded” to list packages on which nothing more depends. This can be used to get list of packages that may be removed (but you may have installed them for another reasons as well).
Do you mean with this that you used YaST > Software > Software Management?
You do not tell us which package, thus we have to assume a lot (which may lead to misunderstandings). But when it is for a package from a non-standrd repo and you do not have other packages installed from that repo, you could de-install at least all coming from that repo (and remove the repo).
There is /var/log/zypp/history. Look for the date you did the installation and check all lines with |install|. That must show you what happened.
You say that also packages were updated. That is something hat wonders me. Wasn’t you system up-to-date?
To get rid of the currently installed application and all dependencies it pulled in during its installation (and which are no longer needed after its removal) is “the easy part” …
# zypper rm -u packagename
however to get the “old” version back gets more complicated:
If your system is configured to keep a copy of all packages installed after the initial installation you should be able to delete the current version and re-install the “old” one.
If you are using openSUSE Leap (15.1 or 15.2) and the “current” version of the application came from the the oss-update- or the non-oss-update-repository then you probably can reinstall the (“old”) version from the oss- or non-oss-repository via Yast software management.
If you still have the installation media (and the “old” version of the application in question is on this media) you can re-install it from the installation media (will work for openSUSE Tumbleweed and openSUSE Leap).
You can try to find the “old” version of the package in the internet (probably some openSUSE mirrors keep older versions?) and install it.
If you are using snapshots (what you are obviously not) you could roll back to a snapshot which offers the “old” version.
Thank you for your answers.
With that I can choose the best way in my case.
sudo zypper pa --unneeded
Loading repository data...
Reading installed packages...
S | Repository | Name | Version | Arch
--+------------------------+----------------------+-------------------+-------
i | Main Repository (OSS) | enblend-enfuse | 4.2-lp151.2.46 | x86_64
i | Main Repository (OSS) | exiftool | 10.80-lp151.2.1 | noarch
i | Main Repository (OSS) | libwx_gtk2u_qa-suse3 | 3.0.3-lp151.6.14 | x86_64
i | Main Update Repository | systemd-network | 234-lp151.26.22.1 | x86_64
Does that mean I can remove 4 packages without breaking the config? systemd-network as well?
however to get the “old” version back gets more complicated:
Sorry, I didn’t tell it right. I mean I don’t want to break the other applications running. No need to get back the old version of the application I tried in this case.
Do you mean with this that you used YaST > Software > Software Management?
I tried digikam application, photo management. Yes, I installed it from Yast. It’s too heavy and professional for me.
/var/log/zypp/history
2020-08-16 10:04:37|command|root@xxx.zzzz.org|'/usr/bin/ruby.ruby2.5' '--encoding=utf-8' '/usr/lib/YaST2/bin/y2start' 'sw_single' 'qt' '-name' 'YaST2' '-icon' 'yast'|
2020-08-16 10:04:37|install|libJudy1|1.0.5-lp151.2.2|x86_64||download.opensuse.org-oss|caffb309663f71a9987dfba57a3450cdbb7cb8c208f5f63fc021d8698f7a62cc|
2020-08-16 10:04:38|install|libKF5CalendarCore5|18.12.3-lp151.1.1|x86_64||download.opensuse.org-oss|78ba0a2d4b5454fbb1af2ed26e9a8fd88b7ee2f7fcaa70ab2f78f172be11199d|
2020-08-16 10:04:38|install|libKF5Contacts5|18.12.3-lp151.1.1|x86_64||download.opensuse.org-oss|c71e858e9ad2918691a9bc9fca994b53c387253ddea7524fafc106ff1b5b0b5c|
2020-08-16 10:04:38|install|libKF5ItemModels5|5.55.0-lp151.1.1|x86_64||download.opensuse.org-oss|7d9a4b035f8410bd039be2c38b7f00fa07b65d0792c75d7709b7fba6211d0f40|
2020-08-16 10:04:38|install|libKF5Mime5|18.12.3-lp151.1.1|x86_64||download.opensuse.org-oss|9f2db5e4a35e74f950fb8c1633350e7ff08a6f6b5bd1afe057bf8fb1f642f3dd|
2020-08-16 10:04:38|install|libKF5Prison5|5.55.0-lp151.1.1|x86_64||download.opensuse.org-oss|6d6ac89651c4f16d319414b8b78b32f28901fa3f5c623892791e23e9369056c9|
2020-08-16 10:04:39|install|libKF5Sane5|18.12.3-lp151.1.1|x86_64||download.opensuse.org-oss|6a431d26f4283bf9774c42fbffa45630dfe0d46ca01cc7f94bd34cd12119695d|
2020-08-16 10:04:39|install|libKF5ThreadWeaver5|5.55.0-lp151.1.1|x86_64||download.opensuse.org-oss|2b6cadb123cd0e4ff2f2421b14c6d687716b6c1af0bccd89d3fe5f02282513bc|
2020-08-16 10:04:39|install|libQtAV1|1.12.0-lp151.3.3|x86_64||download.opensuse.org-oss|ebca9a784b04a87d7bc9a66c8e1f6b9cf337ba9c526df740075f6242555db9ff|
2020-08-16 10:04:39|install|libgps23|3.17-lp151.3.5|x86_64||download.opensuse.org-oss|1a4989d2f00e040f97cb8b390b3312b28d0efe88b4f551981af08483b62c3e0e|
2020-08-16 10:04:39|install|libhdf5-103|1.10.4-lp151.5.1|x86_64||download.opensuse.org-oss|5e899f3877a6e15b424fdb541f33fb41cadb7fb11ff8a6fc72877b03fae834ac|
2020-08-16 10:04:40|install|liblensfun1|0.3.2-lp151.4.3|x86_64||download.opensuse.org-oss|81b0dfc1f2bce95f97b6f07e5427df3070df49fae1042e2cc99224d7e10d34b6|
2020-08-16 10:04:40|install|libmarblewidget-qt5-28|18.12.3-lp151.1.3|x86_64||download.opensuse.org-oss|97999259b7fe6b3cba68ad3e1bd4ef34830b86c7bf12496af4786624d3d0eaf0|
2020-08-16 10:04:40|install|libpano13-3|2.9.19-lp151.2.3|x86_64||download.opensuse.org-oss|bd6ca762e6b4f610cf989ae6997f7cc1067eab21c54541e68b1fa00863896bb1|
2020-08-16 10:04:40|install|libshp2|1.5.0-lp151.1.1|x86_64||download.opensuse.org-oss|94ddf00bac6600122746bc7dc729b138053e7cb015e87f5eae95179181f59b12|
2020-08-16 10:04:40|install|libwx_gtk2u_qa-suse3|3.0.3-lp151.6.14|x86_64||download.opensuse.org-oss|a9a20a0b00c09a32bd06b5bcdb53dbc6ea34942dcc3bdb6edb660aef99191f0b|
2020-08-16 10:04:41|install|perl-Archive-Zip|1.60-lp151.3.1|noarch||download.opensuse.org-oss|4e5aa212ef6afaf9352cacd07000051093cdfd9d0e9b97f7c7d484de86048481|
2020-08-16 10:04:41|install|perl-File-RandomAccess|10.80-lp151.2.1|noarch||download.opensuse.org-oss|1c397461311086c73a46af2f60058c4679faf8f6710c24ec80dd1d37c6eb2283|
2020-08-16 10:04:41|install|kcontacts-lang|18.12.3-lp151.1.1|noarch||download.opensuse.org-oss|d1545d27a999803dd8359376fcd64e92319d6b7b1b846cf1659bea7cb26be4e9|
2020-08-16 10:04:41|install|kmime-lang|18.12.3-lp151.1.1|noarch||download.opensuse.org-oss|10b270933905242dc716ad89bdb0d8b3b330e52f25e30afc24c26fb75a9c1fd7|
2020-08-16 10:04:41|install|prison-qt5-imports|5.55.0-lp151.1.1|x86_64||download.opensuse.org-oss|cf0afd564eb92146e762b8599fac24ac6a537c260329a94034012d86bcdd5bd6|
2020-08-16 10:04:41|install|libksane-lang|18.12.3-lp151.1.1|noarch||download.opensuse.org-oss|049a6aa7dcfe5b7929a2f43ae0ac4b114b166edba7b91406a4be566098618d64|
2020-08-16 10:04:41|install|libQtAVWidgets1|1.12.0-lp151.3.3|x86_64||download.opensuse.org-oss|b05d618c4a442c6b48186fbc447b59812af738dc9b0006182174687c31a0a2a7|
2020-08-16 10:04:41|install|libhdf5_hl100|1.10.4-lp151.5.1|x86_64||download.opensuse.org-oss|5f13f5b5cbf51af284f2a44bcbb55b1a38aa7d1ede5c7c84b5d7d381ebe1b7e7|
2020-08-16 10:04:42|install|libastro1|18.12.3-lp151.1.3|x86_64||download.opensuse.org-oss|3881a395012a6cd1635f6a586ae94b8df427997e7f74c227c8d09209517ce36b|
2020-08-16 10:04:42|install|perl-Image-ExifTool|10.80-lp151.2.1|noarch||download.opensuse.org-oss|3709bd1d7959cce78b500966cdab260f96fe1fb452c8c2e519481a74bbee32a5|
2020-08-16 10:04:42|install|libvigraimpex11|1.11.1-lp151.3.4|x86_64||download.opensuse.org-oss|bcc483e199a0de668daee4d46c1d4096409230f0900c048bac33276e5db51f46|
2020-08-16 10:04:43|install|exiftool|10.80-lp151.2.1|noarch||download.opensuse.org-oss|bcbd7637b5eb87acf9a942778b32b63b3887fd9674600376cfaa12823da192a3|
2020-08-16 10:04:43|install|enblend-enfuse|4.2-lp151.2.46|x86_64||download.opensuse.org-oss|4d3fca53a6fdd3f30d9899341df46f168f91b6cb6e146800ea1744718ff2c573|
# 2020-08-16 10:04:45 hugin-2018.0.0-lp151.2.5.x86_64.rpm installed ok
# Additional rpm output:
# Unknown media type in type 'all/all'
# Unknown media type in type 'all/allfiles'
#
2020-08-16 10:04:45|install|hugin|2018.0.0-lp151.2.5|x86_64||download.opensuse.org-oss|0c4e0bd1d3a065746c2a2206d12d23f135992d4d0526268943939b4473fbb503|
2020-08-16 10:04:46|install|libKF5Plasma5|5.55.0-lp151.2.3.1|x86_64||download.opensuse.org-oss_1|1650e95e8a892cb68b32f1717fb86ff2715a848b372dc14abad600c97305acb6|
2020-08-16 10:04:46|install|libQt5Sql5-mysql|5.9.7-lp151.4.3.1|x86_64||download.opensuse.org-oss_1|98c74812dcc270fc10d78a250c6e3a242bd57bd381f569939a484d9bff1abeb3|
2020-08-16 10:04:46|install|mariadb-errormessages|10.2.32-lp151.2.15.1|noarch||download.opensuse.org-oss_1|ff6194363b119559ce7148861e98bf85c7e1c12cacc5ec238408b654de023b4e|
# 2020-08-16 10:04:46 mariadb-client-10.2.32-lp151.2.15.1.x86_64.rpm installed ok
# Additional rpm output:
# usermod: no changes
#
2020-08-16 10:04:46|install|mariadb-client|10.2.32-lp151.2.15.1|x86_64||download.opensuse.org-oss_1|dbb2cc3d69d4fe7da2e626054b9f688aff9994f1e7adf1ed3ede29b64fca1110|
# 2020-08-16 10:04:51 mariadb-10.2.32-lp151.2.15.1.x86_64.rpm installed ok
# Additional rpm output:
# usermod: no changes
#
2020-08-16 10:04:51|install|mariadb|10.2.32-lp151.2.15.1|x86_64||download.opensuse.org-oss_1|a9bc49bbf27adfd1d98d053b145904aee9d9f77b42379f3a7cf3efa9e6660b3f|
2020-08-16 10:04:51|install|libKF5AkonadiPrivate5|18.12.3-lp151.3.4.1|x86_64||download.opensuse.org-oss_1|a14e33febb69fc119458e4060baaaa50f6b0a16521b4bcb628163dcd86b7c2f6|
2020-08-16 10:04:51|install|libKF5AkonadiCore5|18.12.3-lp151.3.4.1|x86_64||download.opensuse.org-oss_1|2ff80645ce9bc06108b414c09d634dafc1cd9fc7351a77c6ff61704522cdcd6b|
2020-08-16 10:04:51|install|libKF5AkonadiXml5|18.12.3-lp151.3.4.1|x86_64||download.opensuse.org-oss_1|f2b87573575ed9106de35f36dd233005492223decc649edef079359f4b7519d8|
2020-08-16 10:04:52|install|libKF5AkonadiWidgets5|18.12.3-lp151.3.4.1|x86_64||download.opensuse.org-oss_1|6e17534b9fd69ce2a6c46128c5117972dd216bdcfa1cad0bacd7d02ee5e68676|
2020-08-16 10:04:52|install|libKF5AkonadiAgentBase5|18.12.3-lp151.3.4.1|x86_64||download.opensuse.org-oss_1|e2b9c6b19313ac5b7210f2137be0a59c40014528a5a8ac72a5fdcf0e2985c0eb|
# 2020-08-16 10:04:53 akonadi-server-18.12.3-lp151.3.4.1.x86_64.rpm installed ok
# Additional rpm output:
# Unknown media type in type 'all/all'
# Unknown media type in type 'all/allfiles'
#
2020-08-16 10:04:53|install|akonadi-server|18.12.3-lp151.3.4.1|x86_64||download.opensuse.org-oss_1|cf7ed36281046c2350d33c9a30eb8316a1e96cfdd1e3636eb38f1ef4daec2650|
2020-08-16 10:04:53|install|akonadi-server-lang|18.12.3-lp151.3.4.1|noarch||download.opensuse.org-oss_1|5d4a382a80697d610fcbd60928759dc3c4783141bd35f4e90c1b3631781239ec|
2020-08-16 10:04:53|install|akonadi-server-sqlite|18.12.3-lp151.3.4.1|x86_64||download.opensuse.org-oss_1|ab701362f74f03dba50db290000181c93e491b85654cd6bdb2d7008e0bb84bf0|
2020-08-16 10:04:53|install|libKF5Runner5|5.55.0-lp151.1.1|x86_64||download.opensuse.org-oss|076395d2688c6a63c7e838b2cd79893e182ad171869d241e04fabfc3a72240f8|
2020-08-16 10:04:53|install|akonadi-contact|18.12.3-lp151.1.1|x86_64||download.opensuse.org-oss|a533c045f2cb2cac22ed499231d4fce352c01fcf089fe3ac2e8545f0ffe876c0|
# 2020-08-16 10:04:54 marble-18.12.3-lp151.1.3.x86_64.rpm installed ok
# Additional rpm output:
# Unknown media type in type 'all/all'
# Unknown media type in type 'all/allfiles'
#
2020-08-16 10:04:54|install|marble|18.12.3-lp151.1.3|x86_64||download.opensuse.org-oss|c380b0f90d94aa027e47a7c87b620910bd096830ec58e3801b396107ec3fc29e|
2020-08-16 10:04:55|install|libKF5ContactEditor5|18.12.3-lp151.1.1|x86_64||download.opensuse.org-oss|ce2b4afc356f05f1068bb6db7f04d4c5c2cf9fe0ab5665deafcf28e31241d63f|
2020-08-16 10:04:55|install|marble-kde|18.12.3-lp151.1.3|x86_64||download.opensuse.org-oss|bcc4086fd9cb7c37775b33b58aed8363b51aa009d1aaf8adb284537c6b316476|
2020-08-16 10:04:55|install|libKF5AkonadiContact5|18.12.3-lp151.1.1|x86_64||download.opensuse.org-oss|7bbf8693353518f86a0e5bba9724dff137c255872b5aebcc0607d57ea37c4fde|
2020-08-16 10:04:57|install|marble-data|18.12.3-lp151.1.3|noarch||download.opensuse.org-oss|ac22c3f5e14196905ba6e4fed9e49fa95977c28109540fdc30905b7e386faa71|
2020-08-16 10:04:59|install|libdigikamcore6|6.0.0-lp151.1.1|x86_64||download.opensuse.org-oss|ec7af0189eb4f67304816cf60fc99af07fb9afd276d3037bca4c7640e390ce58|
2020-08-16 10:04:59|install|akonadi-contact-lang|18.12.3-lp151.1.1|noarch||download.opensuse.org-oss|899b4d92d9bb28ba14fc08494aff8828b8e6267383de87b38ed462de0a609417|
2020-08-16 10:05:00|install|marble-lang|18.12.3-lp151.1.3|noarch||download.opensuse.org-oss|2be6f8283da060a445bb6971cbefc747ff97115a6fb79674a450fce715f514d8|
2020-08-16 10:05:01|install|showfoto|6.0.0-lp151.1.1|x86_64||download.opensuse.org-oss|f4240812df6a174796619d41b191a6ce126e282672e0a9064ecacd7ea0632c57|
2020-08-16 10:05:01|install|marble-doc|18.12.3-lp151.1.3|noarch||download.opensuse.org-oss|3dfc9c9103454db763cba068b815e0aa584cafa29161d7084d8b13f3f4026c68|
2020-08-16 10:05:09|install|digikam|6.0.0-lp151.1.1|x86_64|root@loja.locdom.org|download.opensuse.org-oss|c5b0249f8b94f65593093ea24bceb2d57b53b350e53900a381bbc5b4851b3ebe|
2020-08-16 10:05:10|install|digikam-lang|6.0.0-lp151.1.1|noarch||download.opensuse.org-oss|8bc05632cbf9a4296d8c2122e0420f9bdd49da96448f52c14ecac253bc8d4f94|
# 2020-08-16 10:05:10 New update message /var/adm/update-messages/mariadb-10.2.32-lp151.2.15.1-something
2020-08-16 10:05:10|patch |openSUSE-2019-1448|1|noarch|download.opensuse.org-oss_1|moderate|recommended|not-needed|applied|
2020-08-16 10:05:10|patch |openSUSE-2019-1518|1|noarch|download.opensuse.org-oss_1|moderate|recommended|not-needed|applied|
2020-08-16 10:05:10|patch |openSUSE-2019-1991|1|noarch|download.opensuse.org-oss_1|moderate|recommended|not-needed|applied|
2020-08-16 10:05:10|patch |openSUSE-2019-2698|1|noarch|download.opensuse.org-oss_1|moderate|security|not-needed|applied|
2020-08-16 10:05:10|patch |openSUSE-2020-289|1|noarch|download.opensuse.org-oss_1|moderate|security|not-needed|applied|
2020-08-16 10:05:10|patch |openSUSE-2020-870|1|noarch|download.opensuse.org-oss_1|moderate|security|not-needed|applied|
I started to remove some packages manually but it’s painful.
rpm -qa --last | more
libhdf5-103-mvapich2-1.10.4-lp151.5.2.x86_64 Sun 16 Aug 2020 10:32:44 IST
mpi-selector-1.0.3-lp151.2.1.noarch Sun 16 Aug 2020 10:32:43 IST
mpich-3.2.1-lp151.8.10.x86_64 Sun 16 Aug 2020 10:32:43 IST
libgps23-3.17-lp151.3.5.x86_64 Sun 16 Aug 2020 10:31:48 IST
libQt5Sql5-mysql-5.9.7-lp151.4.3.1.x86_64 Sun 16 Aug 2020 10:04:46 IST
exiftool-10.80-lp151.2.1.noarch Sun 16 Aug 2020 10:04:43 IST
enblend-enfuse-4.2-lp151.2.46.x86_64 Sun 16 Aug 2020 10:04:43 IST
perl-Image-ExifTool-10.80-lp151.2.1.noarch Sun 16 Aug 2020 10:04:42 IST
libvigraimpex11-1.11.1-lp151.3.4.x86_64 Sun 16 Aug 2020 10:04:42 IST
perl-File-RandomAccess-10.80-lp151.2.1.noarch Sun 16 Aug 2020 10:04:41 IST
perl-Archive-Zip-1.60-lp151.3.1.noarch Sun 16 Aug 2020 10:04:41 IST
libhdf5_hl100-1.10.4-lp151.5.1.x86_64 Sun 16 Aug 2020 10:04:41 IST
libwx_gtk2u_qa-suse3-3.0.3-lp151.6.14.x86_64 Sun 16 Aug 2020 10:04:40 IST
Is it possible to take this package list and uninstall in batch with only one command?
Why all the trouble? Just de-install Digicam and let the rest alone. It costs you only a tiny amount of disk space. Trying to remove all those maybe unneeded packages might run you into trouble at the slightest wrong decission token.