Ubuntu: Installing graphite-carbon via apt unattended


I'm trying to create an automation script that install Graphite without user interaction (unattended).

I try with the following command:

sudo apt-get -q -y --force-yes install graphite-carbon=0.9.12-3  

During the installation, I will be asked whether I want Carbon to remove the database files.

Do you know if there is a way to run an installation without these kind of UI? I have only this problem with Graphite-carbon.


At the moment, I am automating complicated setups too. To accomplish this task, I use AutoExpect. It records keyboard input into an Expect script, which can be run again.

sudo apt-get install expect-dev  

Then you can type


to start recording. When you are finished, simply type Exit to stop recording and save the script. It will be saved in the directory you are in as script.exp The script will not run directly, you will have to adapt it a bit using a text editor. It will not only apply to the software you are installing, you can use it for about anything. More info:




I have used:

sudo DEBIAN_FRONTEND=noninteractive apt-get -q -y --force-yes install graphite-carbon  

Now it works without any confirmation message.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »