What is the Difference Between `apt-get purge` and `apt-get remove`?
Is there any difference between
sudo apt-get purge <package-name>
and
sudo apt-get remove <package-name>
?
I often see people recommend one or the other.
In other words, what does apt-get purge
remove that apt-get remove
doesn't?
apt uninstall
add a comment |
Is there any difference between
sudo apt-get purge <package-name>
and
sudo apt-get remove <package-name>
?
I often see people recommend one or the other.
In other words, what does apt-get purge
remove that apt-get remove
doesn't?
apt uninstall
Related (sinceapt
is similar, but an alternative to,apt-get
): askubuntu.com/questions/936810/apt-remove-vs-purge
– michael
Sep 19 '18 at 19:21
add a comment |
Is there any difference between
sudo apt-get purge <package-name>
and
sudo apt-get remove <package-name>
?
I often see people recommend one or the other.
In other words, what does apt-get purge
remove that apt-get remove
doesn't?
apt uninstall
Is there any difference between
sudo apt-get purge <package-name>
and
sudo apt-get remove <package-name>
?
I often see people recommend one or the other.
In other words, what does apt-get purge
remove that apt-get remove
doesn't?
apt uninstall
apt uninstall
edited Aug 15 '17 at 21:40
Seth
asked Dec 21 '12 at 23:13
Seth♦Seth
34.3k26110162
34.3k26110162
Related (sinceapt
is similar, but an alternative to,apt-get
): askubuntu.com/questions/936810/apt-remove-vs-purge
– michael
Sep 19 '18 at 19:21
add a comment |
Related (sinceapt
is similar, but an alternative to,apt-get
): askubuntu.com/questions/936810/apt-remove-vs-purge
– michael
Sep 19 '18 at 19:21
Related (since
apt
is similar, but an alternative to, apt-get
): askubuntu.com/questions/936810/apt-remove-vs-purge– michael
Sep 19 '18 at 19:21
Related (since
apt
is similar, but an alternative to, apt-get
): askubuntu.com/questions/936810/apt-remove-vs-purge– michael
Sep 19 '18 at 19:21
add a comment |
3 Answers
3
active
oldest
votes
As the man apt-get
page says:
remove - remove is identical to install except that packages are removed instead of installed. Note that removing a package leaves its configuration files on the system. If a plus sign is appended to the package name (with no intervening space), the identified package will be installed instead of removed.
purge - purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).
This of course, does not apply to packages that hold configuration files inside the user's home folder (eg: /home/SexyNoJutsuUser
), this files will not be touched ( Why does "Purge" not remove everything related to an app? )
So for example, if you were to remove Chrome, Firefox, XBMC or any other that holds some configuration files inside your /home
folder, this files will stay there.
On the other hand if you were to install apache, squid, mysql or any other services similar that save their files in /etc
, this configuration files will be deleted if you use purge
.
Purge can be used on a meta package to remove it, while leaving the underlying package intact. If you want to upgrade the base system without affecting postgres, you can apt-get purge the postgres meta package and then upgrading from Debian 7- Debian 8 will leave your postgres version untouched.
– boatcoder
Jul 7 '16 at 14:33
add a comment |
An excerpt from my answer on another question:
apt-get remove packagename
will remove the binaries, but not the configuration or data files of the packagepackagename
.
apt-get purge packagename
, orapt-get remove --purge packagename
will remove about everything regarding the package
packagename
, [...]
Particularly useful
when you want to 'start all over' with an application because you
messed up the configuration.
add a comment |
apt-get purge
removes configuration files, while apt-get remove
does not.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f231562%2fwhat-is-the-difference-between-apt-get-purge-and-apt-get-remove%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
As the man apt-get
page says:
remove - remove is identical to install except that packages are removed instead of installed. Note that removing a package leaves its configuration files on the system. If a plus sign is appended to the package name (with no intervening space), the identified package will be installed instead of removed.
purge - purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).
This of course, does not apply to packages that hold configuration files inside the user's home folder (eg: /home/SexyNoJutsuUser
), this files will not be touched ( Why does "Purge" not remove everything related to an app? )
So for example, if you were to remove Chrome, Firefox, XBMC or any other that holds some configuration files inside your /home
folder, this files will stay there.
On the other hand if you were to install apache, squid, mysql or any other services similar that save their files in /etc
, this configuration files will be deleted if you use purge
.
Purge can be used on a meta package to remove it, while leaving the underlying package intact. If you want to upgrade the base system without affecting postgres, you can apt-get purge the postgres meta package and then upgrading from Debian 7- Debian 8 will leave your postgres version untouched.
– boatcoder
Jul 7 '16 at 14:33
add a comment |
As the man apt-get
page says:
remove - remove is identical to install except that packages are removed instead of installed. Note that removing a package leaves its configuration files on the system. If a plus sign is appended to the package name (with no intervening space), the identified package will be installed instead of removed.
purge - purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).
This of course, does not apply to packages that hold configuration files inside the user's home folder (eg: /home/SexyNoJutsuUser
), this files will not be touched ( Why does "Purge" not remove everything related to an app? )
So for example, if you were to remove Chrome, Firefox, XBMC or any other that holds some configuration files inside your /home
folder, this files will stay there.
On the other hand if you were to install apache, squid, mysql or any other services similar that save their files in /etc
, this configuration files will be deleted if you use purge
.
Purge can be used on a meta package to remove it, while leaving the underlying package intact. If you want to upgrade the base system without affecting postgres, you can apt-get purge the postgres meta package and then upgrading from Debian 7- Debian 8 will leave your postgres version untouched.
– boatcoder
Jul 7 '16 at 14:33
add a comment |
As the man apt-get
page says:
remove - remove is identical to install except that packages are removed instead of installed. Note that removing a package leaves its configuration files on the system. If a plus sign is appended to the package name (with no intervening space), the identified package will be installed instead of removed.
purge - purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).
This of course, does not apply to packages that hold configuration files inside the user's home folder (eg: /home/SexyNoJutsuUser
), this files will not be touched ( Why does "Purge" not remove everything related to an app? )
So for example, if you were to remove Chrome, Firefox, XBMC or any other that holds some configuration files inside your /home
folder, this files will stay there.
On the other hand if you were to install apache, squid, mysql or any other services similar that save their files in /etc
, this configuration files will be deleted if you use purge
.
As the man apt-get
page says:
remove - remove is identical to install except that packages are removed instead of installed. Note that removing a package leaves its configuration files on the system. If a plus sign is appended to the package name (with no intervening space), the identified package will be installed instead of removed.
purge - purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).
This of course, does not apply to packages that hold configuration files inside the user's home folder (eg: /home/SexyNoJutsuUser
), this files will not be touched ( Why does "Purge" not remove everything related to an app? )
So for example, if you were to remove Chrome, Firefox, XBMC or any other that holds some configuration files inside your /home
folder, this files will stay there.
On the other hand if you were to install apache, squid, mysql or any other services similar that save their files in /etc
, this configuration files will be deleted if you use purge
.
edited Jan 25 at 2:04
Pablo Bianchi
2,4851532
2,4851532
answered Dec 21 '12 at 23:21
Luis Alvarado♦Luis Alvarado
145k135485653
145k135485653
Purge can be used on a meta package to remove it, while leaving the underlying package intact. If you want to upgrade the base system without affecting postgres, you can apt-get purge the postgres meta package and then upgrading from Debian 7- Debian 8 will leave your postgres version untouched.
– boatcoder
Jul 7 '16 at 14:33
add a comment |
Purge can be used on a meta package to remove it, while leaving the underlying package intact. If you want to upgrade the base system without affecting postgres, you can apt-get purge the postgres meta package and then upgrading from Debian 7- Debian 8 will leave your postgres version untouched.
– boatcoder
Jul 7 '16 at 14:33
Purge can be used on a meta package to remove it, while leaving the underlying package intact. If you want to upgrade the base system without affecting postgres, you can apt-get purge the postgres meta package and then upgrading from Debian 7- Debian 8 will leave your postgres version untouched.
– boatcoder
Jul 7 '16 at 14:33
Purge can be used on a meta package to remove it, while leaving the underlying package intact. If you want to upgrade the base system without affecting postgres, you can apt-get purge the postgres meta package and then upgrading from Debian 7- Debian 8 will leave your postgres version untouched.
– boatcoder
Jul 7 '16 at 14:33
add a comment |
An excerpt from my answer on another question:
apt-get remove packagename
will remove the binaries, but not the configuration or data files of the packagepackagename
.
apt-get purge packagename
, orapt-get remove --purge packagename
will remove about everything regarding the package
packagename
, [...]
Particularly useful
when you want to 'start all over' with an application because you
messed up the configuration.
add a comment |
An excerpt from my answer on another question:
apt-get remove packagename
will remove the binaries, but not the configuration or data files of the packagepackagename
.
apt-get purge packagename
, orapt-get remove --purge packagename
will remove about everything regarding the package
packagename
, [...]
Particularly useful
when you want to 'start all over' with an application because you
messed up the configuration.
add a comment |
An excerpt from my answer on another question:
apt-get remove packagename
will remove the binaries, but not the configuration or data files of the packagepackagename
.
apt-get purge packagename
, orapt-get remove --purge packagename
will remove about everything regarding the package
packagename
, [...]
Particularly useful
when you want to 'start all over' with an application because you
messed up the configuration.
An excerpt from my answer on another question:
apt-get remove packagename
will remove the binaries, but not the configuration or data files of the packagepackagename
.
apt-get purge packagename
, orapt-get remove --purge packagename
will remove about everything regarding the package
packagename
, [...]
Particularly useful
when you want to 'start all over' with an application because you
messed up the configuration.
edited Apr 13 '17 at 12:24
Community♦
1
1
answered Dec 21 '12 at 23:18
gertvdijkgertvdijk
50.5k18142238
50.5k18142238
add a comment |
add a comment |
apt-get purge
removes configuration files, while apt-get remove
does not.
add a comment |
apt-get purge
removes configuration files, while apt-get remove
does not.
add a comment |
apt-get purge
removes configuration files, while apt-get remove
does not.
apt-get purge
removes configuration files, while apt-get remove
does not.
edited Jul 17 '17 at 10:30
d a i s y
3,32282344
3,32282344
answered Dec 21 '12 at 23:19
moon.musickmoon.musick
1,31211320
1,31211320
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f231562%2fwhat-is-the-difference-between-apt-get-purge-and-apt-get-remove%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Related (since
apt
is similar, but an alternative to,apt-get
): askubuntu.com/questions/936810/apt-remove-vs-purge– michael
Sep 19 '18 at 19:21