Ask Your Question

How can I remove all installed packages and keep only base system packages?

asked 2016-04-16 01:54:28 -0500

ahmed.alamassi gravatar image

Instead of stripping off things i don't need , I thought it would easier to start from a minimal system and add the things I need. how to remove all package and only keep the packages in the "Minimal Install" group ? can I do it on my current fedora system?? or do I have to download the minimal fedora iso and do fresh install?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-04-17 16:32:45 -0500

Rabin gravatar image

One why to do this is by dumping all the packages from a clean minimal installation (you can use a vm for that)

root@tempvm# rpm -qa --qf "%{NAME}\n" > file1

and then look for all the un-common packages.

cat file1 file2 | sort | uniq -u

this will give you all the extra packages that where installed over the base system. then you can pipe this to xargs and remove all the packages.

cat file1 file2 | sort | uniq -u | xargs dnf remove [-y**]

** add the -y only after you made sure nothing critical will be removed.

edit flag offensive delete link more


. thanks

ahmed.alamassi gravatar imageahmed.alamassi ( 2016-04-18 00:40:28 -0500 )edit

Question Tools



Asked: 2016-04-16 01:54:28 -0500

Seen: 897 times

Last updated: Apr 17 '16