How to remove installed elpa package

前端 未结 5 928
故里飘歌
故里飘歌 2020-12-13 08:10

This is strange, the list-packages buffer shows \"available\" as the status for some packages that are actually installed. Shouldn\'t that column show \"install

相关标签:
5条回答
  • 2020-12-13 08:52

    I found it by chance: bring on the package list, find the package(s) you want to remove, and press 'D'. When you are done, press 'X' and it will remove the packages. It works exactly like when installing new packages, except that you replace the 'I' by 'D' (I think 'D' stands for 'delete').

    0 讨论(0)
  • 2020-12-13 08:56

    For Emacs 25.1 and above, the command

    M-x package-delete

    raises a prompt with autocompletion into names of packages you have got installed.

    0 讨论(0)
  • 2020-12-13 09:00

    The package menu shows all known versions of a package.

    As such, you may see an installed package listed as available as well, for instance, if there is a newer version of the same package available, or if the same package is available from different archives.

    To delete such a package, simply scroll down in the list, or use C-s <PACKAGE-NAME> to search for occurrences of the package. Once you find the installed version of the package, press D to mark the package for deletion; if this fails, press d. You should see a D mark in the left before the package name. Press x to execute the action and actually delete the package.

    0 讨论(0)
  • 2020-12-13 09:02

    I've just uninstalled django-snippets packages by

    M-x package-list-packages
    C-s django-snippets
    

    Mark the package for deletion by typing d. Execute by typing x.

    Exactly the same thing as removing the related directory inside ~/.emacs.d/elpa/.

    NB, for the recent emacs, the command is list-packages (instead of packages-list-packages)

    0 讨论(0)
  • 2020-12-13 09:05

    I like to use the poor's man solution for that: just remove the directory for the unwanted package in ~/.emacs.d/elpa/ (or the directory specified in your package-directory-list).

    EDIT: this solution is intended for scenarios where something went wrong (maybe a bug, maybe the result of manual tinkering with packages' data). Please use @lunaryon answer; it is the right way of doing this on the 99.9% of the cases.

    0 讨论(0)
提交回复
热议问题