How to completely remove a package in Ubuntu (like it never existed)
When I remove a package in Ubuntu using apt-get remove package
, it always seems to leave behind a lot of files... for example, log files in /var/log
, config files in /etc
, data in /var/lib
, etc.
How do I COMPLETELY remove every trace of a package in Ubuntu, as if it never existed?
linux ubuntu apt package-management packages
add a comment |
When I remove a package in Ubuntu using apt-get remove package
, it always seems to leave behind a lot of files... for example, log files in /var/log
, config files in /etc
, data in /var/lib
, etc.
How do I COMPLETELY remove every trace of a package in Ubuntu, as if it never existed?
linux ubuntu apt package-management packages
add a comment |
When I remove a package in Ubuntu using apt-get remove package
, it always seems to leave behind a lot of files... for example, log files in /var/log
, config files in /etc
, data in /var/lib
, etc.
How do I COMPLETELY remove every trace of a package in Ubuntu, as if it never existed?
linux ubuntu apt package-management packages
When I remove a package in Ubuntu using apt-get remove package
, it always seems to leave behind a lot of files... for example, log files in /var/log
, config files in /etc
, data in /var/lib
, etc.
How do I COMPLETELY remove every trace of a package in Ubuntu, as if it never existed?
linux ubuntu apt package-management packages
linux ubuntu apt package-management packages
asked Feb 25 at 11:25
torjinxtorjinx
1406
1406
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You should purge those packages.
apt-get purge somepackage
from man apt-get (APT-GET(8)
)
purge
purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).
This is supposed to remove everything added by the package, such as config and data files. But I would assume it's possible that it generated something that is left behind anyway. dpkg
doesn't track everything related to a package... and its cleanup scripts and such can be assumed to be imperfect and sometimes fail. Maybe it won't remove logs for example.
1
It should be noted that even purge does not remove e.g. config files in~/.local
, see this answer over on askubuntu for a deeper dive.
– Jared Smith
Feb 25 at 14:10
5
purge
will not remove files which were generated by the application, as opposed to the ones installed byapt
. This includes the files generated indirectly, such as logs (which come from the app sending logging events to/dev/log
, which is then parsed by another utility (rsyslog
, ...)
– WoJ
Feb 25 at 17:40
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
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%2fserverfault.com%2fquestions%2f955616%2fhow-to-completely-remove-a-package-in-ubuntu-like-it-never-existed%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You should purge those packages.
apt-get purge somepackage
from man apt-get (APT-GET(8)
)
purge
purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).
This is supposed to remove everything added by the package, such as config and data files. But I would assume it's possible that it generated something that is left behind anyway. dpkg
doesn't track everything related to a package... and its cleanup scripts and such can be assumed to be imperfect and sometimes fail. Maybe it won't remove logs for example.
1
It should be noted that even purge does not remove e.g. config files in~/.local
, see this answer over on askubuntu for a deeper dive.
– Jared Smith
Feb 25 at 14:10
5
purge
will not remove files which were generated by the application, as opposed to the ones installed byapt
. This includes the files generated indirectly, such as logs (which come from the app sending logging events to/dev/log
, which is then parsed by another utility (rsyslog
, ...)
– WoJ
Feb 25 at 17:40
add a comment |
You should purge those packages.
apt-get purge somepackage
from man apt-get (APT-GET(8)
)
purge
purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).
This is supposed to remove everything added by the package, such as config and data files. But I would assume it's possible that it generated something that is left behind anyway. dpkg
doesn't track everything related to a package... and its cleanup scripts and such can be assumed to be imperfect and sometimes fail. Maybe it won't remove logs for example.
1
It should be noted that even purge does not remove e.g. config files in~/.local
, see this answer over on askubuntu for a deeper dive.
– Jared Smith
Feb 25 at 14:10
5
purge
will not remove files which were generated by the application, as opposed to the ones installed byapt
. This includes the files generated indirectly, such as logs (which come from the app sending logging events to/dev/log
, which is then parsed by another utility (rsyslog
, ...)
– WoJ
Feb 25 at 17:40
add a comment |
You should purge those packages.
apt-get purge somepackage
from man apt-get (APT-GET(8)
)
purge
purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).
This is supposed to remove everything added by the package, such as config and data files. But I would assume it's possible that it generated something that is left behind anyway. dpkg
doesn't track everything related to a package... and its cleanup scripts and such can be assumed to be imperfect and sometimes fail. Maybe it won't remove logs for example.
You should purge those packages.
apt-get purge somepackage
from man apt-get (APT-GET(8)
)
purge
purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).
This is supposed to remove everything added by the package, such as config and data files. But I would assume it's possible that it generated something that is left behind anyway. dpkg
doesn't track everything related to a package... and its cleanup scripts and such can be assumed to be imperfect and sometimes fail. Maybe it won't remove logs for example.
answered Feb 25 at 11:40
PeterPeter
1,87611121
1,87611121
1
It should be noted that even purge does not remove e.g. config files in~/.local
, see this answer over on askubuntu for a deeper dive.
– Jared Smith
Feb 25 at 14:10
5
purge
will not remove files which were generated by the application, as opposed to the ones installed byapt
. This includes the files generated indirectly, such as logs (which come from the app sending logging events to/dev/log
, which is then parsed by another utility (rsyslog
, ...)
– WoJ
Feb 25 at 17:40
add a comment |
1
It should be noted that even purge does not remove e.g. config files in~/.local
, see this answer over on askubuntu for a deeper dive.
– Jared Smith
Feb 25 at 14:10
5
purge
will not remove files which were generated by the application, as opposed to the ones installed byapt
. This includes the files generated indirectly, such as logs (which come from the app sending logging events to/dev/log
, which is then parsed by another utility (rsyslog
, ...)
– WoJ
Feb 25 at 17:40
1
1
It should be noted that even purge does not remove e.g. config files in
~/.local
, see this answer over on askubuntu for a deeper dive.– Jared Smith
Feb 25 at 14:10
It should be noted that even purge does not remove e.g. config files in
~/.local
, see this answer over on askubuntu for a deeper dive.– Jared Smith
Feb 25 at 14:10
5
5
purge
will not remove files which were generated by the application, as opposed to the ones installed by apt
. This includes the files generated indirectly, such as logs (which come from the app sending logging events to /dev/log
, which is then parsed by another utility (rsyslog
, ...)– WoJ
Feb 25 at 17:40
purge
will not remove files which were generated by the application, as opposed to the ones installed by apt
. This includes the files generated indirectly, such as logs (which come from the app sending logging events to /dev/log
, which is then parsed by another utility (rsyslog
, ...)– WoJ
Feb 25 at 17:40
add a comment |
Thanks for contributing an answer to Server Fault!
- 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%2fserverfault.com%2fquestions%2f955616%2fhow-to-completely-remove-a-package-in-ubuntu-like-it-never-existed%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