How NOT to Break your Debian System!
Debian is a robust and reliable Linux system, but you still can break it if you are not doing things the Debian way. This post is about the most common mistakes made by new Debian users. In short, I will show you how not to break your Debian System. In addition, you will learn what you should avoid doing in your Debian system.
I like Debian because it is a very reliable and stable Linux distribution. However, it is not always the ideal distribution for beginners. If you’re one of them, you will learn what to avoid doing in Debian to save yourself from troubles. This post is based on the Debian Wiki page advice for new users on not breaking their Debian system.
As Debian is a very stable Linux distribution. I think it is actually not that easy to break it unless you do it intentionally. However, you can do some harmful changes that will show up much later, for example, during the upgrade of your Debian to the next version.
If you use the Debian Testing branch, these rules also apply, just make sure you install Debina Testing the right way!
So, let’s start to show you how not to break Debian. You can watch the video tutorial or continue reading below.
1. Install Software only from Debian repositories
Debian repositories are the largest in the Linux world, and only some very specific software can’t be found there. So, you betteravoid installing programs from other websites. The packages in the Debian repositories are tailored for Debian system and they are known to install and work properly.
If you add contrib and non-free repositories to your source.list, you will have access to almost all software you need.
However, if you still need some program that is not available in Debian repositories, try NOT to install them system-wide. This is the first rule that will teach you how not to break Debian.
Install executable programs locally
You can make a folder Programs in your home folder, and place all unofficial programs there. Many Linux programs come as executable files. So, copy program executables to the
Now, make them executable. In this case I will use DensiTree as example.
chmod +x DensiTree.*
Of course, change DensiTree.* for the name of the file of your program.
~/Programs to your system environment:
Of course, I’m using my system as an example, replace the path with your path. After doing this step, you can run your program without problems from the terminal.
To make it permanent, you need to run this export command during the login. If you use lightdm login manager, create a file
~/.xsessionrc and add the previous command.
For other than lightdm login managers, you can add export command to
~/.profile instead of
Compile and install programs locally
This approach should also be applied to programs that will be installed manually from the source code. In other words, they are installed with the commands
sudo make install.
So, do NOT install them system-wide using administrative privileges. To put it differently, do not run the
sudo make install command.
If you install a program this way, it will be out of control of the APT package manager. So, you will not able to remove it with
sudo apt-get remove or from the Synaptic package manager. Besides, software installed this way may conflict with other installed packages and these programs will not update automatically, so it may be a security issue on your system.
It is better to install these programs into your home directory as a regular user. Simply, specify an installation directory with
–prefix, when you run
For example, you can install curl into the
~/Programs folder we created before.
Then, run the
Finally, install it.
Again, I am using a sample program. Depending on the program you are going to install, there might be slight differences.
Thus, if you install third-party applications this way, you will have a very stable and more solid Debian system.
Rule 2: Do NOT combine Debian Stable with other Debian branches
You should not combine packages from Debian Stable and Debian Testing or Unstable. If you open your
source.list, all the repositories there should belong to one Debian branch.
Run this command:
Stretch is currently the stable version of Debian. All repositories refer to
Stretch, and this is how it should be. That is, you should not have multiple sources for different versions of Debian. It would be a disaster.
Rule 3: Do NOT use Ubuntu packages and repositories in Debian
The third rule that will teach you how not to break Debian is do not use Ubuntu packages in Debian. Although Ubuntu is based on Debian, there is no backward comparability between the Ubuntu packages and Debian. So, you can not add Ubuntu PPA or install deb packages created for Ubuntu.
If you really need an Ubuntu program on Debian, there is a way to make Ubuntu PPA package suitable for Debian. You need to follow this guide to make it.
4. Do NOT install drivers using manufacturer install scripts
It primary concerns Graphic card drivers. It is not recommended to install drivers you download from non-Debian websites. These drivers may work fine, but you will have to reinstall them manually every time a kernel of your system is updated.
Debian provides Free open source drivers for most hardware, so use these drivers. If you absolutely need proprietary drivers, for example, an open source driver does not work correctly, or a proprietary driver works better, install a driver following the Debian way.
Usually, it is as simple as add
non-free to your
Next, install the
fglrx-driver package for AMD cards or
nvidia-driver for Nvidia cards.
But you better consult Debian Wiki for details before you attempt installing these drivers.
5. Don't suffer from Shiny New Stuff Syndrome
Basically, the reason that Debian Stable is stable is that all the packages are not bleeding edge. Every piece of software is well tested before making into Debian main branch, so it is little old.
If you absolutely need a more recent version of a program than it is available in Debian stable, first try to install it from Debian backports.
If it is not available in the backports, you can install it from unofficial sources but it might not work correctly and probably won’t get security updates. So, all depends on you.
6. Be careful with removing software
The sixth rule that will teach you how not to break Debian is to be careful with removing software. In Debian, many packages are connected and share dependencies. If you decide to remove a program, you may remove a lot of other programs which you didn’t intend to remove, but they are removed as a dependency.
For example, you decided you don’t need the
orage package anymore. So, you opened Synaptic, searched for
orage and selected to remove it.
However, you will see this action would remove the whole XFCE desktop and you wouldn’t have a graphical interface after this. So, you should not remove the package
orage because it is a part of XFCE desktop.
Thus, whenever you remove packages in synaptic or through a terminal, check what else would be removed with it. Don’t uninstall programs without knowing what you’re doing. If you don’t know or have doubts, it’s better not to do it before breaking the system.
7. Be careful with installing software
I always advise reading the description of every program you are about to install. This is to find out if the program does what we need it to do.
Also, check the version of a program you want to install. Make sure it is what you need. For example, if you decide to install the
linux-headers package. If you search for it in the Synaptic Package Manager and you will see many versions.
But you need to check you current kernel with the following command:
Now you know what version of
linux-headers you need.
This is just an example, but you need to understand that you must install what you really need.
It is also a good idea to always search how to install a particular program in Debian Wiki. For example, you need to install java. If you search for java on Synaptic, you will find many options and it is unclear what to install if you are a new user.
But if you search how to install java in Debian Wiki, you will find that for the web-browser plugin you need
icedtea-plugin, and for Java Runtime Environment, you need to install
So, be careful with the packages you are about to install.
8. Do NOT blindly follow online tutorials
The last rule that show you how NOT to break Debian is do NOT blindly follow online tutorials. There are many blogs and youtube channels with Debian tutorials. Many of them are helpful indeed. Often such tutorials are more detailed and better presented than the official Debian Wiki. But they are not free of mistakes and errors. I would even advice you not to follow my tutorials without any thinking. Like every human being, I do not know everything and do mistakes.
So, the best way is to follow Debian Wiki. But if you follow unofficial tutorials, think about what you are doing. If possible, check with several sources before apply any changes to your system.
So, these were 8 rules of How NOT to Break your Debian System! These are not strict rules, think about them as recommendations.
If you have anything to add to these rules, let know on the comment section.
Also, check my other post on Debian.
Please consider supporting this project:
Become a patron Buy me a coffee Shop on Amazon Buy Linux Laptop Build Linux PC BTC: 1CfCLTYCqqDfYbngcvQtEav3n7SMZihfSS