How do I strip down a Linux system (especially CentOS 7) to only the parts that I need? I'm not asking for a specific command, but more for a hint to where I can find more about the packages that I have and what they do.

If I use yum list installed I get a long list of packages. How do I know for which purpose they are on my machine? How do I know if de-installing them will not break my machine?

Edit: Thanks for the answers. Using another Linux distribution is not the way I would like to go. First we are using a software which requires RHEL or Debian and second we use CentOS on a few different machines, so I would like to keep using CentOS 7.

Thank you nmks for the yum info <package> command which helps a lot.

PS: I saw this: How to strip a Linux system, but my question kind of goes into another direction.

  • You can check the man page for a command or search for it (or even search for the name of the package). But unless you really need it to take up the least amount of space, just remove anything that might run in the background and which you don't need. If you are willing to branch out from CentOS, Arch Linux provides a very nice and minimal base for building a completely custom system, but if you really need something small you could go for a kernel combined with busybox instead. – Joe Dec 15 '15 at 16:28
  • yum info <package name> will give you details about the package including a description and a url of the site of the package. If removing it it's going to break anything it's another issue, usually you'll have to worry more about the dependencies than the package itself. What you're trying to do it's going to be a tedious task of going through 1500+ packages on a default system. Better do a basic installation (300 packages I think) and go after installing the packages that you need. – nkms Dec 15 '15 at 17:59
  • nkms thank you for the tip. yes you are right, a minimal install would have been best. – dice Dec 16 '15 at 11:28
  • Joe thank you for your comment. Do you have a tip or link for me to how I can find the unnecessary background programs? – dice Dec 16 '15 at 11:32

If you install a minimal system, this should be minimal with no additional packages.

Otherwise you could try building your own Linux from Scratch and understand what packages are necessary and which not.

  • 1
    Hi! Thanks for your answer.Perhaps I should have asked like this: where do I get reliable Information about a package? For example: I have the package enchant.x86_64 installed. What is it for? – dice Dec 15 '15 at 14:34

why not use puppy Linux instead ? it's Linux version which lets you custom build Linux as per requirement


What is Puppy Linux?

Puppy Linux is an operating system for computers. Other well-known operating systems are Microsoft Windows, Apple OSX, and MS-DOS. Puppy Linux is based on GNU/Linux. It is completely free and open source software. How is Puppy Different?

Small size, ~100MB! This lends itself to some very useful and unique features.
'Live' booting from CDs, DVDs, USB flash drives, and other portable media.
Runs from RAM, making it unusually fast even in old PCs and in netbooks with solid state storage media.
Very low minimum system requirements.
Boot time is well under a minute, 30-40 seconds in most systems.
Includes a wide range of applications: wordprocessors, spreadsheets, internet browsers, games, image editors and many utilities. Extra software in the form of dotpets. There is a GUI Puppy Software Installer included.
Puppy is easy to use and little technical knowledge is assumed. Most hardware is automatically detected.

New Minimal Installation

If possible install only a minimal-install and start from there. Perhaps switch to a different distribution, with is optimized for being small, doing just one thing or so on.

Removing Packages One by One

Otherwise (unfortunately very tedious):

  1. Use yum info <package> to get a lot of infos about the packages.
  2. Use Infos from How to strip a Linux system? to find unused programs.
  3. Remove the packages you do not need.

yum grouplist and yum groupremove <yumgroup> may make this a little bit easier/faster.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.