I accidentally purged python2.7, can you help me restore?
up vote
1
down vote
favorite
On Ubuntu 16.04 (Unity) I accidentally did apt-get purge python2.7 python-pip python-dev
(I wasn't aware of the fact that python 2.7 is used by so many important apps.
After getting a small heart attack and reading online that I could end up with a very stripped down Ubuntu, I was actually surprised that everything looked the same. Even after a reboot.
Now I notice some things actually not working anymore, like the Samba client with Nautilus for example.
Can you help me restore everything that got removed? I extracted this list of packages from /var/log/apt/history.log
:
https://pastebin.com/4W5dRUAw
Should I just extract the raw package names and feed them through apt-get install or do the right packages have to be installed to reference to the dependancies?
apt
add a comment |
up vote
1
down vote
favorite
On Ubuntu 16.04 (Unity) I accidentally did apt-get purge python2.7 python-pip python-dev
(I wasn't aware of the fact that python 2.7 is used by so many important apps.
After getting a small heart attack and reading online that I could end up with a very stripped down Ubuntu, I was actually surprised that everything looked the same. Even after a reboot.
Now I notice some things actually not working anymore, like the Samba client with Nautilus for example.
Can you help me restore everything that got removed? I extracted this list of packages from /var/log/apt/history.log
:
https://pastebin.com/4W5dRUAw
Should I just extract the raw package names and feed them through apt-get install or do the right packages have to be installed to reference to the dependancies?
apt
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
On Ubuntu 16.04 (Unity) I accidentally did apt-get purge python2.7 python-pip python-dev
(I wasn't aware of the fact that python 2.7 is used by so many important apps.
After getting a small heart attack and reading online that I could end up with a very stripped down Ubuntu, I was actually surprised that everything looked the same. Even after a reboot.
Now I notice some things actually not working anymore, like the Samba client with Nautilus for example.
Can you help me restore everything that got removed? I extracted this list of packages from /var/log/apt/history.log
:
https://pastebin.com/4W5dRUAw
Should I just extract the raw package names and feed them through apt-get install or do the right packages have to be installed to reference to the dependancies?
apt
On Ubuntu 16.04 (Unity) I accidentally did apt-get purge python2.7 python-pip python-dev
(I wasn't aware of the fact that python 2.7 is used by so many important apps.
After getting a small heart attack and reading online that I could end up with a very stripped down Ubuntu, I was actually surprised that everything looked the same. Even after a reboot.
Now I notice some things actually not working anymore, like the Samba client with Nautilus for example.
Can you help me restore everything that got removed? I extracted this list of packages from /var/log/apt/history.log
:
https://pastebin.com/4W5dRUAw
Should I just extract the raw package names and feed them through apt-get install or do the right packages have to be installed to reference to the dependancies?
apt
apt
asked Dec 1 at 0:27
![](https://i.stack.imgur.com/Psajj.jpg?s=32&g=1)
![](https://i.stack.imgur.com/Psajj.jpg?s=32&g=1)
adrifromhh
133
133
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
In Ubuntu 18.04 reinstall python2.7 and all of the purged packages that depends on python2.7. Open the terminal and type:
sudo apt install python-all
sudo reboot
sudo apt install python-wnck python-gnome2 python-six libgcj16 python-tdb python2.7-dev python-pymysql vprerex python-vte gvfs-backends python-samba steam-launcher python-xdg vlc-plugin-samba python-markupsafe python-pycurl python-zmq libcairo2-dev python-dnspython python-keybinder python-gi samba samba-dsdb-modules libatspi2.0-dev python-dbus python2.7 python-appindicator jackd2 texlive-lang-indic python-cairo python-chardet python-gobject python-notify texlive-pictures prosper libsdl2-dev python python-lxml guake python-pexpect texlive-xetex texlive-latex-extra python-talloc samba-libs python-crypto libpango1.0-dev gcj-5-jre-lib gimp texlive-music m64py python-ptyprocess python-jinja2 prerex texlive-full libgtk-3-dev arronax libjack-jackd2-0 libjack-jackd2-0:i386 python-pkg-resources libpulse-dev python-html5lib python-all python-apt inkscape samba-vfs-modules libglib2.0-dev python-bs4 arronax-base texlive-pstricks hamster-applet python-dev python-pyorbit zenmap python-setuptools libsmbclient libgdk-pixbuf2.0-dev samba-common-bin libasound2-plugins:i386 hamster-indicator python-gtk2 pdftk python-decorator texlive-formats-extra ipython python-gconf jackd2-firewire python-wheel texlive-science ndiff python-ldb python-gobject-2 python-glade2 libgcj-common python-nautilus libatk1.0-dev libatk-bridge2.0-dev python-numpy python-tornado python-pip python-simplegeneric arronax-nautilus python-all-dev ipython-notebook
Thank you, that already looks very promising! What I wanted to aim for with my last question was: Are these packages being marked as manually installed by reinstalling them this way? Is that a problem when I want to remove them later? Can you also show the commands you used to get the packages from my list formatted so nicely? That would be great!
– adrifromhh
Dec 1 at 1:38
1
Yes, the packages are marked as manually installed by reinstalling them this way, and that will not be a problem if you want to remove them later because the packages are installed in exactly the same way either way, To format the package list I replaced the beginning and ending characters of the strings to be removed by < and > characters in Gedit and then pasted the entire string back into my answer enclosed by<pre>
at the beginning and</pre>
at the end. This converts the entire string into preformatted text which does not show any text between each pair of the < and > characters.
– karel
Dec 1 at 2:02
Another way to do the same thing in the terminal with a one-liner command is:sed -e s/:amd64 [^,]*,//g input.txt
where input.txt contains the original unformatted text.
– karel
Dec 1 at 2:16
1
Thanks to both of you! That was very helpful. My system seems to be repaired.
– adrifromhh
Dec 2 at 19:28
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',
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%2f1097554%2fi-accidentally-purged-python2-7-can-you-help-me-restore%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
up vote
2
down vote
accepted
In Ubuntu 18.04 reinstall python2.7 and all of the purged packages that depends on python2.7. Open the terminal and type:
sudo apt install python-all
sudo reboot
sudo apt install python-wnck python-gnome2 python-six libgcj16 python-tdb python2.7-dev python-pymysql vprerex python-vte gvfs-backends python-samba steam-launcher python-xdg vlc-plugin-samba python-markupsafe python-pycurl python-zmq libcairo2-dev python-dnspython python-keybinder python-gi samba samba-dsdb-modules libatspi2.0-dev python-dbus python2.7 python-appindicator jackd2 texlive-lang-indic python-cairo python-chardet python-gobject python-notify texlive-pictures prosper libsdl2-dev python python-lxml guake python-pexpect texlive-xetex texlive-latex-extra python-talloc samba-libs python-crypto libpango1.0-dev gcj-5-jre-lib gimp texlive-music m64py python-ptyprocess python-jinja2 prerex texlive-full libgtk-3-dev arronax libjack-jackd2-0 libjack-jackd2-0:i386 python-pkg-resources libpulse-dev python-html5lib python-all python-apt inkscape samba-vfs-modules libglib2.0-dev python-bs4 arronax-base texlive-pstricks hamster-applet python-dev python-pyorbit zenmap python-setuptools libsmbclient libgdk-pixbuf2.0-dev samba-common-bin libasound2-plugins:i386 hamster-indicator python-gtk2 pdftk python-decorator texlive-formats-extra ipython python-gconf jackd2-firewire python-wheel texlive-science ndiff python-ldb python-gobject-2 python-glade2 libgcj-common python-nautilus libatk1.0-dev libatk-bridge2.0-dev python-numpy python-tornado python-pip python-simplegeneric arronax-nautilus python-all-dev ipython-notebook
Thank you, that already looks very promising! What I wanted to aim for with my last question was: Are these packages being marked as manually installed by reinstalling them this way? Is that a problem when I want to remove them later? Can you also show the commands you used to get the packages from my list formatted so nicely? That would be great!
– adrifromhh
Dec 1 at 1:38
1
Yes, the packages are marked as manually installed by reinstalling them this way, and that will not be a problem if you want to remove them later because the packages are installed in exactly the same way either way, To format the package list I replaced the beginning and ending characters of the strings to be removed by < and > characters in Gedit and then pasted the entire string back into my answer enclosed by<pre>
at the beginning and</pre>
at the end. This converts the entire string into preformatted text which does not show any text between each pair of the < and > characters.
– karel
Dec 1 at 2:02
Another way to do the same thing in the terminal with a one-liner command is:sed -e s/:amd64 [^,]*,//g input.txt
where input.txt contains the original unformatted text.
– karel
Dec 1 at 2:16
1
Thanks to both of you! That was very helpful. My system seems to be repaired.
– adrifromhh
Dec 2 at 19:28
add a comment |
up vote
2
down vote
accepted
In Ubuntu 18.04 reinstall python2.7 and all of the purged packages that depends on python2.7. Open the terminal and type:
sudo apt install python-all
sudo reboot
sudo apt install python-wnck python-gnome2 python-six libgcj16 python-tdb python2.7-dev python-pymysql vprerex python-vte gvfs-backends python-samba steam-launcher python-xdg vlc-plugin-samba python-markupsafe python-pycurl python-zmq libcairo2-dev python-dnspython python-keybinder python-gi samba samba-dsdb-modules libatspi2.0-dev python-dbus python2.7 python-appindicator jackd2 texlive-lang-indic python-cairo python-chardet python-gobject python-notify texlive-pictures prosper libsdl2-dev python python-lxml guake python-pexpect texlive-xetex texlive-latex-extra python-talloc samba-libs python-crypto libpango1.0-dev gcj-5-jre-lib gimp texlive-music m64py python-ptyprocess python-jinja2 prerex texlive-full libgtk-3-dev arronax libjack-jackd2-0 libjack-jackd2-0:i386 python-pkg-resources libpulse-dev python-html5lib python-all python-apt inkscape samba-vfs-modules libglib2.0-dev python-bs4 arronax-base texlive-pstricks hamster-applet python-dev python-pyorbit zenmap python-setuptools libsmbclient libgdk-pixbuf2.0-dev samba-common-bin libasound2-plugins:i386 hamster-indicator python-gtk2 pdftk python-decorator texlive-formats-extra ipython python-gconf jackd2-firewire python-wheel texlive-science ndiff python-ldb python-gobject-2 python-glade2 libgcj-common python-nautilus libatk1.0-dev libatk-bridge2.0-dev python-numpy python-tornado python-pip python-simplegeneric arronax-nautilus python-all-dev ipython-notebook
Thank you, that already looks very promising! What I wanted to aim for with my last question was: Are these packages being marked as manually installed by reinstalling them this way? Is that a problem when I want to remove them later? Can you also show the commands you used to get the packages from my list formatted so nicely? That would be great!
– adrifromhh
Dec 1 at 1:38
1
Yes, the packages are marked as manually installed by reinstalling them this way, and that will not be a problem if you want to remove them later because the packages are installed in exactly the same way either way, To format the package list I replaced the beginning and ending characters of the strings to be removed by < and > characters in Gedit and then pasted the entire string back into my answer enclosed by<pre>
at the beginning and</pre>
at the end. This converts the entire string into preformatted text which does not show any text between each pair of the < and > characters.
– karel
Dec 1 at 2:02
Another way to do the same thing in the terminal with a one-liner command is:sed -e s/:amd64 [^,]*,//g input.txt
where input.txt contains the original unformatted text.
– karel
Dec 1 at 2:16
1
Thanks to both of you! That was very helpful. My system seems to be repaired.
– adrifromhh
Dec 2 at 19:28
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
In Ubuntu 18.04 reinstall python2.7 and all of the purged packages that depends on python2.7. Open the terminal and type:
sudo apt install python-all
sudo reboot
sudo apt install python-wnck python-gnome2 python-six libgcj16 python-tdb python2.7-dev python-pymysql vprerex python-vte gvfs-backends python-samba steam-launcher python-xdg vlc-plugin-samba python-markupsafe python-pycurl python-zmq libcairo2-dev python-dnspython python-keybinder python-gi samba samba-dsdb-modules libatspi2.0-dev python-dbus python2.7 python-appindicator jackd2 texlive-lang-indic python-cairo python-chardet python-gobject python-notify texlive-pictures prosper libsdl2-dev python python-lxml guake python-pexpect texlive-xetex texlive-latex-extra python-talloc samba-libs python-crypto libpango1.0-dev gcj-5-jre-lib gimp texlive-music m64py python-ptyprocess python-jinja2 prerex texlive-full libgtk-3-dev arronax libjack-jackd2-0 libjack-jackd2-0:i386 python-pkg-resources libpulse-dev python-html5lib python-all python-apt inkscape samba-vfs-modules libglib2.0-dev python-bs4 arronax-base texlive-pstricks hamster-applet python-dev python-pyorbit zenmap python-setuptools libsmbclient libgdk-pixbuf2.0-dev samba-common-bin libasound2-plugins:i386 hamster-indicator python-gtk2 pdftk python-decorator texlive-formats-extra ipython python-gconf jackd2-firewire python-wheel texlive-science ndiff python-ldb python-gobject-2 python-glade2 libgcj-common python-nautilus libatk1.0-dev libatk-bridge2.0-dev python-numpy python-tornado python-pip python-simplegeneric arronax-nautilus python-all-dev ipython-notebook
In Ubuntu 18.04 reinstall python2.7 and all of the purged packages that depends on python2.7. Open the terminal and type:
sudo apt install python-all
sudo reboot
sudo apt install python-wnck python-gnome2 python-six libgcj16 python-tdb python2.7-dev python-pymysql vprerex python-vte gvfs-backends python-samba steam-launcher python-xdg vlc-plugin-samba python-markupsafe python-pycurl python-zmq libcairo2-dev python-dnspython python-keybinder python-gi samba samba-dsdb-modules libatspi2.0-dev python-dbus python2.7 python-appindicator jackd2 texlive-lang-indic python-cairo python-chardet python-gobject python-notify texlive-pictures prosper libsdl2-dev python python-lxml guake python-pexpect texlive-xetex texlive-latex-extra python-talloc samba-libs python-crypto libpango1.0-dev gcj-5-jre-lib gimp texlive-music m64py python-ptyprocess python-jinja2 prerex texlive-full libgtk-3-dev arronax libjack-jackd2-0 libjack-jackd2-0:i386 python-pkg-resources libpulse-dev python-html5lib python-all python-apt inkscape samba-vfs-modules libglib2.0-dev python-bs4 arronax-base texlive-pstricks hamster-applet python-dev python-pyorbit zenmap python-setuptools libsmbclient libgdk-pixbuf2.0-dev samba-common-bin libasound2-plugins:i386 hamster-indicator python-gtk2 pdftk python-decorator texlive-formats-extra ipython python-gconf jackd2-firewire python-wheel texlive-science ndiff python-ldb python-gobject-2 python-glade2 libgcj-common python-nautilus libatk1.0-dev libatk-bridge2.0-dev python-numpy python-tornado python-pip python-simplegeneric arronax-nautilus python-all-dev ipython-notebook
edited Dec 1 at 14:51
answered Dec 1 at 1:06
![](https://i.stack.imgur.com/zqElV.png?s=32&g=1)
![](https://i.stack.imgur.com/zqElV.png?s=32&g=1)
karel
56k11124142
56k11124142
Thank you, that already looks very promising! What I wanted to aim for with my last question was: Are these packages being marked as manually installed by reinstalling them this way? Is that a problem when I want to remove them later? Can you also show the commands you used to get the packages from my list formatted so nicely? That would be great!
– adrifromhh
Dec 1 at 1:38
1
Yes, the packages are marked as manually installed by reinstalling them this way, and that will not be a problem if you want to remove them later because the packages are installed in exactly the same way either way, To format the package list I replaced the beginning and ending characters of the strings to be removed by < and > characters in Gedit and then pasted the entire string back into my answer enclosed by<pre>
at the beginning and</pre>
at the end. This converts the entire string into preformatted text which does not show any text between each pair of the < and > characters.
– karel
Dec 1 at 2:02
Another way to do the same thing in the terminal with a one-liner command is:sed -e s/:amd64 [^,]*,//g input.txt
where input.txt contains the original unformatted text.
– karel
Dec 1 at 2:16
1
Thanks to both of you! That was very helpful. My system seems to be repaired.
– adrifromhh
Dec 2 at 19:28
add a comment |
Thank you, that already looks very promising! What I wanted to aim for with my last question was: Are these packages being marked as manually installed by reinstalling them this way? Is that a problem when I want to remove them later? Can you also show the commands you used to get the packages from my list formatted so nicely? That would be great!
– adrifromhh
Dec 1 at 1:38
1
Yes, the packages are marked as manually installed by reinstalling them this way, and that will not be a problem if you want to remove them later because the packages are installed in exactly the same way either way, To format the package list I replaced the beginning and ending characters of the strings to be removed by < and > characters in Gedit and then pasted the entire string back into my answer enclosed by<pre>
at the beginning and</pre>
at the end. This converts the entire string into preformatted text which does not show any text between each pair of the < and > characters.
– karel
Dec 1 at 2:02
Another way to do the same thing in the terminal with a one-liner command is:sed -e s/:amd64 [^,]*,//g input.txt
where input.txt contains the original unformatted text.
– karel
Dec 1 at 2:16
1
Thanks to both of you! That was very helpful. My system seems to be repaired.
– adrifromhh
Dec 2 at 19:28
Thank you, that already looks very promising! What I wanted to aim for with my last question was: Are these packages being marked as manually installed by reinstalling them this way? Is that a problem when I want to remove them later? Can you also show the commands you used to get the packages from my list formatted so nicely? That would be great!
– adrifromhh
Dec 1 at 1:38
Thank you, that already looks very promising! What I wanted to aim for with my last question was: Are these packages being marked as manually installed by reinstalling them this way? Is that a problem when I want to remove them later? Can you also show the commands you used to get the packages from my list formatted so nicely? That would be great!
– adrifromhh
Dec 1 at 1:38
1
1
Yes, the packages are marked as manually installed by reinstalling them this way, and that will not be a problem if you want to remove them later because the packages are installed in exactly the same way either way, To format the package list I replaced the beginning and ending characters of the strings to be removed by < and > characters in Gedit and then pasted the entire string back into my answer enclosed by
<pre>
at the beginning and </pre>
at the end. This converts the entire string into preformatted text which does not show any text between each pair of the < and > characters.– karel
Dec 1 at 2:02
Yes, the packages are marked as manually installed by reinstalling them this way, and that will not be a problem if you want to remove them later because the packages are installed in exactly the same way either way, To format the package list I replaced the beginning and ending characters of the strings to be removed by < and > characters in Gedit and then pasted the entire string back into my answer enclosed by
<pre>
at the beginning and </pre>
at the end. This converts the entire string into preformatted text which does not show any text between each pair of the < and > characters.– karel
Dec 1 at 2:02
Another way to do the same thing in the terminal with a one-liner command is:
sed -e s/:amd64 [^,]*,//g input.txt
where input.txt contains the original unformatted text.– karel
Dec 1 at 2:16
Another way to do the same thing in the terminal with a one-liner command is:
sed -e s/:amd64 [^,]*,//g input.txt
where input.txt contains the original unformatted text.– karel
Dec 1 at 2:16
1
1
Thanks to both of you! That was very helpful. My system seems to be repaired.
– adrifromhh
Dec 2 at 19:28
Thanks to both of you! That was very helpful. My system seems to be repaired.
– adrifromhh
Dec 2 at 19:28
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f1097554%2fi-accidentally-purged-python2-7-can-you-help-me-restore%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