Error sh: 0: getcwd() failed: No such file or directory when I try to upgrade Debian

20,664

The error code is obvious: someone removed your current working directory (the directory from which you started the command).

I recommend to type cd to go to your home directory and retry the command.

If someone removed your home directory, chdir to / or /tmp/.

Share:
20,664
Ricardo Prieto
Author by

Ricardo Prieto

Electrónico, amante de la Seguridad Informática, Desarrollo, Investigación, la Política y las buenas Fiestas... Intelectual, Multi-faceta y Alegre.

Updated on September 18, 2022

Comments

  • Ricardo Prieto
    Ricardo Prieto over 1 year

    Error when i try to upgrade Debian based distro

    After this operation, 347 MB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    sh: 0: getcwd() failed: No such file or directory
    sh: 0: getcwd() failed: No such file or directory
    

    if I cancel the process with ctrl+c I have the following message:

    E: Sub-process /usr/bin/apt-listchanges --apt || test $? -lt 10 received signal 2.
    E: Failure running script /usr/bin/apt-listchanges --apt || test $? -lt 10